Changeset 89c57b6 in mainline for uspace/lib/c/include/net/socket_codes.h
- Timestamp:
- 2011-04-13T14:45:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88634420
- Parents:
- cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/net/socket_codes.h
rcefb126 r89c57b6 27 27 */ 28 28 29 /** @addtogroup arp29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * ARP protocol header.35 * Based on the RFC~826.34 * Socket codes and definitions. 35 * This is a part of the network application library. 36 36 */ 37 37 38 #ifndef __NET_ARP_HEADER_H__39 #define __NET_ARP_HEADER_H__38 #ifndef LIBC_SOCKET_CODES_H_ 39 #define LIBC_SOCKET_CODES_H_ 40 40 41 41 #include <sys/types.h> 42 42 43 /** Type definition of an ARP protocol header. 44 * @see arp_header 43 /** @name Address families definitions */ 44 /*@{*/ 45 46 enum { 47 AF_UNKNOWN = 0, 48 AF_INET, /* IPv4 address */ 49 AF_INET6 /* IPv6 address */ 50 }; 51 52 /*@}*/ 53 54 /** @name Protocol families definitions 55 * Same as address families. 45 56 */ 46 typedef struct arp_header arp_header_t; 57 /*@{*/ 47 58 48 /** Type definition of an ARP protocol header pointer. 49 * @see arp_header 50 */ 51 typedef arp_header_t * arp_header_ref; 59 #define PF_INET AF_INET 60 #define PF_INET6 AF_INET6 52 61 53 /** ARP protocol header. 54 */ 55 struct arp_header{ 56 /** Hardware type identifier. 57 * @see hardware.h 58 */ 59 uint16_t hardware; 60 /** Protocol identifier. 61 */ 62 uint16_t protocol; 63 /** Hardware address length in bytes. 64 */ 65 uint8_t hardware_length; 66 /** Protocol address length in bytes. 67 */ 68 uint8_t protocol_length; 69 /** ARP packet type. 70 * @see arp_oc.h 71 */ 72 uint16_t operation; 73 } __attribute__ ((packed)); 62 /*@}*/ 63 64 /** Socket types. */ 65 typedef enum sock_type { 66 /** Stream (connection oriented) socket. */ 67 SOCK_STREAM = 1, 68 /** Datagram (connectionless oriented) socket. */ 69 SOCK_DGRAM = 2, 70 /** Raw socket. */ 71 SOCK_RAW = 3 72 } sock_type_t; 73 74 /** Type definition of the socket length. */ 75 typedef int32_t socklen_t; 74 76 75 77 #endif
Note:
See TracChangeset
for help on using the changeset viewer.