Skip to contentSkip to conversation

socketI implementation

DISCUSSION sting sting 2 participants 2 messages Sep 17, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

I had downloaded the tar.gz of glibc;
I
I am interested in the learning the network layer and implementation of the socket API in glibc
(calls like socket,bind,gethostbyname,etc.).
I saw in the inet subdirectory on glibc that it seems that these calls are eventually result in calls to methods in nss subdirectory.

But I am not sure.
Am I right in my assumption?
or where I can find the implementation of methods like bind(), connect(), socket(), etc.

regards
sting

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail

#1 lore raw
Quoted 10 lines · sting sting

Hello,

I had downloaded the tar.gz of glibc;
I
I am interested in the learning the network layer and implementation of the socket API in glibc
(calls like socket,bind,gethostbyname,etc.).
I saw in the inet subdirectory on glibc that it seems that these calls are eventually result in calls to methods in nss subdirectory.

Quoted 8 lines

But I am not sure.
Am I right in my assumption?
or where I can find the implementation of methods like bind(), connect(), socket(), etc.

regards
sting

Wrong list. However, the interface to the network through the kernel is __NR_socketcall (function 102).
You need to learn how to use find, grep and other Unix tools to search large directory trees like glibc. For instance, in glibc-2.3.1, a lot of utility functions are in glibc-2.3.1/inet and a lot of socket interface code is in glibc-2.3.1/unix/sysv/linux/i386/socket.S

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (794.73 BogoMips).
Note 96.31% of all statistics are fiction.