|
|
1.1 ! root 1: .TH INET 4F "19 March 1982" ! 2: .UC 4 ! 3: .SH NAME ! 4: inet \- Internet protocol family ! 5: .SH SYNOPSIS ! 6: .B #include <sys/types.h> ! 7: .br ! 8: .B #include <netinet/in.h> ! 9: .SH DESCRIPTION ! 10: .de _d ! 11: .if t .ta .6i 2.1i 2.6i ! 12: .\" 2.94 went to 2.6, 3.64 to 3.30 ! 13: .if n .ta .84i 2.6i 3.30i ! 14: .. ! 15: .de _f ! 16: .if t .ta .5i 1.25i 2.5i ! 17: .\" 3.5i went to 3.8i ! 18: .if n .ta .7i 1.75i 3.8i ! 19: .. ! 20: The Internet protocol family is a collection of protocols ! 21: layered atop the ! 22: .I Internet Protocol ! 23: (IP) transport layer, and utilizing the Internet address format. ! 24: The Internet family provides protocol support for the ! 25: SOCK_STREAM, SOCK_DGRAM, and SOCK_RAW socket types; the ! 26: SOCK_RAW interface provides access to the IP protocol. ! 27: .SH ADDRESSING ! 28: Internet addresses are four byte quantities, stored in ! 29: network standard format (on the VAX these are word and byte ! 30: reversed). The include file ! 31: .RI < netinet/in.h > ! 32: defines this address ! 33: as a discriminated union. ! 34: .PP ! 35: Sockets bound to the Internet protocol family utilize ! 36: the following addressing structure, ! 37: .sp 1 ! 38: .nf ! 39: ._f ! 40: struct sockaddr_in { ! 41: short sin_family; ! 42: u_short sin_port; ! 43: struct in_addr sin_addr; ! 44: char sin_zero[8]; ! 45: }; ! 46: .sp 1 ! 47: .fi ! 48: Sockets may be created with the address INADDR_ANY ! 49: to effect \*(lqwildcard\*(rq matching on incoming messages. ! 50: .SH PROTOCOLS ! 51: The Internet protocol family is comprised of ! 52: the IP transport protocol, Internet Control ! 53: Message Protocol (ICMP), Transmission Control ! 54: Protocol (TCP), and User Datagram Protocol (UDP). ! 55: TCP is used to support the SOCK_STREAM ! 56: abstraction while UDP is used to support the SOCK_DGRAM ! 57: abstraction. A raw interface to IP is available ! 58: by creating an Internet socket of type SOCK_RAW. ! 59: The ICMP message protocol is not directly accessible. ! 60: .SH SEE ALSO ! 61: tcp(4P), udp(4P), ip(4P) ! 62: .SH CAVEAT ! 63: The Internet protocol support is subject to change as ! 64: the Internet protocols develop. Users should not depend ! 65: on details of the current implementation, but rather ! 66: the services exported.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.