I am browsing the man pages to find out how to create TCP/IP connections with the socket-, connect-, bind-, listen- and accept- functions, but could not find the information I needed from the corresponding man pages. (SuSE 9.1) Could SuSE please include a reference to ip(7) and/or tcp(7) in the description of the 'protocol' argument in socket(2)? Could SuSE please resolve the conflicting information between getprotoent(3) and ip(7)/tcp(7) on how to get the protocol number? Ip(7)/tcp(7) says 'protocol' should be either 0 or the macro IPPROTO_TCP, while socket(2) says 'protocol' should be gotten from the getprotoent(3) function call (which reads /etc/protocols). I would very much like to use a header file's macro IPPROTO_TCP instead of fetching a world-constant number from /etc/protocols. And it is the macros that are documented in Steven's UNIX Network Programming :-). Could SuSE please include a reference to ip(7)/tcp(7) in the description of the 'const struct sockaddr *serv_addr' argument in connect(2)? The text "Each communications space interprets the serv_addr parameter in its own way." is not very informative. How about making a paragraph based on the following from bind(2): "The rules used in name binding vary between address families. Consult the manual entries in Section 7 for detailed information. For AF_INET see ip(7), ...".
Regards, Håkon Hallingstad Software Developer, EDB +47 4789 8062 hakon.hallingstad@edb.com www.edb.com <http://www.edb.com/>
On Friday 27 May 2005 04:22, Hallingstad Håkon wrote:
I am browsing the man pages to find out how to create TCP/IP connections with the socket-, connect-, bind-, listen- and accept- functions, but could not find the information I needed from the corresponding man pages. (SuSE 9.1)
This guy had a nice tutorial to related to what you're asking: http://www.ecst.csuchico.edu/~beej/guide/net/html/index.html
participants (2)
-
Hallingstad Håkon
-
Synthetic Cartoonz