sockaddr_in in manpage and /usr/include different
OpenBSD 4.0 man 7 ip says: struct sockaddr_in { sa_family_tsin_family; /* address family: AF_INET */ u_int16_t sin_port; /* port in network byte order */ struct in_addr sin_addr; /* internet address */ }; /usr/include/netinet/in.h: struct sockaddr_in { u_int8_tsin_len; sa_family_t sin_family; in_port_t sin_port; struct in_addr sin_addr; int8_t sin_zero[8]; }; No wonder my program didn't work properly and sent UDP with a nonsensical source port when I wrote it according to the manpage and the manpage is wrong. When I added the sin_len entry, it started to work properly. CL
Re: sockaddr_in in manpage and /usr/include different
On Tue, Jun 05, 2007 at 03:29:52PM +0200, Karel Kulhavy wrote: Hi. OpenBSD 4.0 man 7 ip says: Thats interesting. On my OpenBSD 4.0 systems I don't have a man 7 ip. I have a man 4 ip instead - and only man 4 ip. Where did your man 7 ip come from? Section 7 of the man pages are dedicated to Macros and Conventions. What file will be use when you run man 7 ip ? My systems will use: [EMAIL PROTECTED] ~ $ man -w ip /usr/share/man/cat4/ip.0 HTH, Andreas. -- Windows 95: A 32-bit patch for a 16-bit GUI shell running on top of an 8-bit operating system written for a 4-bit processor by a 2-bit company who cannot stand 1 bit of competition.
Re: sockaddr_in in manpage and /usr/include different
On Tue, Jun 05, 2007 at 04:29:48PM +0200, Andreas Maus wrote: On Tue, Jun 05, 2007 at 03:29:52PM +0200, Karel Kulhavy wrote: Hi. OpenBSD 4.0 man 7 ip says: Thats interesting. On my OpenBSD 4.0 systems I don't have a man 7 ip. I have a man 4 ip instead - and only man 4 ip. Where did your man 7 ip come from? Section 7 of the man pages are dedicated to Macros and Conventions. What file will be use when you run man 7 ip ? My systems will use: I made a mistake I actually looked on a manpage in a Linux system. But there is still a problem, in which manpage on OpenBSD 4.0 is the sockaddr_in described, then? I tried various ones like ip, socket, bind, and couldn't find any. CL [EMAIL PROTECTED] ~ $ man -w ip /usr/share/man/cat4/ip.0 HTH, Andreas. -- Windows 95: A 32-bit patch for a 16-bit GUI shell running on top of an 8-bit operating system written for a 4-bit processor by a 2-bit company who cannot stand 1 bit of competition.
Re: sockaddr_in in manpage and /usr/include different
I made a mistake I actually looked on a manpage in a Linux system. But there is still a problem, in which manpage on OpenBSD 4.0 is the sockaddr_in described, then? I tried various ones like ip, socket, bind, and couldn't find any. inet(4) -- Mathieu Sauve-Frankel
Re: sockaddr_in in manpage and /usr/include different
* Karel Kulhavy [EMAIL PROTECTED] [2007-06-05 15:42]: OpenBSD 4.0 man 7 ip says: struct sockaddr_in { sa_family_tsin_family; /* address family: AF_INET */ u_int16_t sin_port; /* port in network byte order */ struct in_addr sin_addr; /* internet address */ }; /usr/include/netinet/in.h: struct sockaddr_in { u_int8_tsin_len; sa_family_t sin_family; in_port_t sin_port; struct in_addr sin_addr; int8_t sin_zero[8]; }; No wonder my program didn't work properly and sent UDP with a nonsensical source port when I wrote it according to the manpage and the manpage is wrong. When I added the sin_len entry, it started to work properly. not even going into that there is no ip manpage in section 7... how on earth did you manage to screw that up? did you define struct sockaddr_in yourself instead of including netinet/in.h? that is beyond retarded and the real source of your problem. -- Henning Brauer, [EMAIL PROTECTED], [EMAIL PROTECTED] BS Web Services, http://bsws.de Full-Service ISP - Secure Hosting, Mail and DNS Services Dedicated Servers, Rootservers, Application Hosting - Hamburg Amsterdam
Re: sockaddr_in in manpage and /usr/include different
On Tue, Jun 05, 2007 at 05:29:47PM +0200, Karel Kulhavy wrote: I made a mistake I actually looked on a manpage in a Linux system. But there O.K. Good to hear ^^ is still a problem, in which manpage on OpenBSD 4.0 is the sockaddr_in described, then? I tried various ones like ip, socket, bind, and couldn't find any. Take a look at man 4 inet (man inet will take you to man 3 inet). HTH, Andreas. -- Windows 95: A 32-bit patch for a 16-bit GUI shell running on top of an 8-bit operating system written for a 4-bit processor by a 2-bit company who cannot stand 1 bit of competition.
Re: sockaddr_in in manpage and /usr/include different
On Tue, 5 Jun 2007, Karel Kulhavy wrote: On Tue, Jun 05, 2007 at 04:29:48PM +0200, Andreas Maus wrote: On Tue, Jun 05, 2007 at 03:29:52PM +0200, Karel Kulhavy wrote: Hi. OpenBSD 4.0 man 7 ip says: Thats interesting. On my OpenBSD 4.0 systems I don't have a man 7 ip. I have a man 4 ip instead - and only man 4 ip. Where did your man 7 ip come from? Section 7 of the man pages are dedicated to Macros and Conventions. What file will be use when you run man 7 ip ? My systems will use: I made a mistake I actually looked on a manpage in a Linux system. But there is still a problem, in which manpage on OpenBSD 4.0 is the sockaddr_in described, then? I tried various ones like ip, socket, bind, and couldn't find any. inet(4), cross referenced from e.g. netintro(4) and socket(2) -Otto