IPaddressidentification

Can anyone help me out in this following issues in network programming ...
1)I can't understand the basic definition of why we use struct ifreq,ioctl;

2)Then I Can't Understand why we assign eth0 in ifreq's name member;

3)Can anyone clearly tell me what a socket is ,becoz i have a doubt whether a socket is something like buffer or what it is ?I can't get a clearcut idea;

4)What an accept,connect,bind,listen will do;

5)what is socket address structure,what does it really mean,is it something like an address or what?

6)Can the client & server be running in same machine,why is it so?

Advance Thanks...
Even if u help me in 1 answer,it will help me a lot,please help me out!!!
1. These provide low level control of network devices. You wouldn't normally use them in that form, it at all.
http://unixhelp.ed.ac.uk/CGI/man-cgi?netdevice+7

2. You obviously have some code you're not telling us about. The code's probably trying to read or configure the first ethernet port, which on Linux is eth0.

3. A socket is a communication end point in the sockets library.

4. These are functions in the sockets library; server side calls.

5. You probably want to start learning about sockets at this point.

6. Yes. Because the internet protocol, IP, specifies a loop back interface, which allows networked applications to run on the same machine. You probably want to learn about TCP/IP too.
Topic archived. No new replies allowed.