Hi all,
I'm coming close to the deadline for my final year project in UL, Ireland.
I'm implementing a kernel module to provide a communication interface to
other modules. Thanks to some help I got from here last week, I got the
server working ok. Now I'm having some mysterious problems with the client.
I'm running the 2.2.16 kernel. The socket creates ok. When I try to do a
connect I get an eafnosupport error. I traced this back to the file
/ipv4/tcp_ipv4.c where it checks if(usin->sin_family != AF_INET). It fails
and returns eafnosupport. I have definately setup the destination address
correctly.
I get the same problem when I leave the socket autobind as I do if I bind it
myself. But one question about the binding, how do I set the source
address? With the server I set sa->sin_addr.s_addr = INADDR_ANY. How do I
tell it to put in my own address? I've tried a few different things but I'm
not sure which is correct.
s
One more question. How do I resolve hostnames to ip addresses without
functions like gethostbyname?
Thanks in advance,
Eoin.
|