The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/include/netinet/in.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2 netinet/in.h
    3 */
    4 
    5 #ifndef _NETINET__IN_H
    6 #define _NETINET__IN_H
    7 
    8 /* Can we include <stdint.h> here or do we need an additional header that is
    9  * safe to include?
   10  */
   11 #include <stdint.h>
   12 
   13 /* Open Group Base Specifications Issue 6 (not complete) */
   14 #define    INADDR_ANY              (uint32_t)0x00000000
   15 #define    INADDR_BROADCAST        (uint32_t)0xFFFFFFFF
   16 
   17 typedef uint16_t        in_port_t;
   18 
   19 #ifndef _IN_ADDR_T
   20 #define _IN_ADDR_T
   21 typedef uint32_t        in_addr_t;
   22 #endif /* _IN_ADDR_T */
   23 
   24 #ifndef _SA_FAMILY_T
   25 #define _SA_FAMILY_T
   26 /* Should match corresponding typedef in <sys/socket.h> */
   27 typedef uint8_t         sa_family_t;
   28 #endif /* _SA_FAMILY_T */
   29 
   30 /* Protocols */
   31 #define IPPROTO_IP      0       /* Dummy protocol */
   32 #define IPPROTO_TCP     6       /* TCP */
   33 #define IPPROTO_UDP     17      /* UDP */
   34 
   35 /* setsockopt options at IP level */
   36 #define IP_ADD_MEMBERSHIP       12
   37 #define IP_DROP_MEMBERSHIP      13
   38 
   39 #ifndef _STRUCT_IN_ADDR
   40 #define _STRUCT_IN_ADDR
   41 struct in_addr
   42 {
   43         in_addr_t       s_addr;
   44 };
   45 #endif
   46 
   47 struct sockaddr_in
   48 {
   49         sa_family_t     sin_family;
   50         in_port_t       sin_port;
   51         struct in_addr  sin_addr;
   52 };
   53 
   54 struct ip_mreq
   55 {
   56         struct  in_addr imr_multiaddr;
   57         struct  in_addr imr_interface;
   58 };
   59 
   60 #endif /* _NETINET__IN_H */

Cache object: a3bc9b18bc57ca838e832b04ff3fd5f2


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.