Home | History | Annotate | Download | only in include
      1 /**
      2  * This file is part of the mingw-w64 runtime package.
      3  * No warranty is given; refer to the file DISCLAIMER within this package.
      4  */
      5 #ifndef _INC_WS2IPDEF
      6 #define _INC_WS2IPDEF
      7 
      8 #include <winapifamily.h>
      9 
     10 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
     11 
     12 #include <in6addr.h>
     13 
     14 #ifdef __cplusplus
     15 extern "C" {
     16 #endif
     17 
     18 typedef struct ipv6_mreq {
     19   struct in6_addr ipv6mr_multiaddr;
     20   unsigned int ipv6mr_interface;
     21 } IPV6_MREQ;
     22 
     23 struct sockaddr_in6_old {
     24   short sin6_family;
     25   u_short sin6_port;
     26   u_long sin6_flowinfo;
     27   struct in6_addr sin6_addr;
     28 };
     29 
     30 typedef union sockaddr_gen {
     31   struct sockaddr Address;
     32   struct sockaddr_in AddressIn;
     33   struct sockaddr_in6_old AddressIn6;
     34 } sockaddr_gen;
     35 
     36 struct sockaddr_in6 {
     37   short sin6_family;
     38   u_short sin6_port;
     39   u_long sin6_flowinfo;
     40   struct in6_addr sin6_addr;
     41   __C89_NAMELESS union {
     42     u_long sin6_scope_id;
     43     SCOPE_ID sin6_scope_struct;
     44   };
     45 };
     46 
     47 typedef struct sockaddr_in6 SOCKADDR_IN6;
     48 typedef struct sockaddr_in6 *PSOCKADDR_IN6;
     49 typedef struct sockaddr_in6 *LPSOCKADDR_IN6;
     50 
     51 typedef struct _INTERFACE_INFO {
     52   u_long iiFlags;
     53   sockaddr_gen iiAddress;
     54   sockaddr_gen iiBroadcastAddress;
     55   sockaddr_gen iiNetmask;
     56 } INTERFACE_INFO,*LPINTERFACE_INFO;
     57 
     58 typedef enum _MULTICAST_MODE_TYPE {
     59   MCAST_INCLUDE   = 0,
     60   MCAST_EXCLUDE
     61 } MULTICAST_MODE_TYPE;
     62 
     63 typedef struct _sockaddr_in6_pair {
     64   PSOCKADDR_IN6 SourceAddress;
     65   PSOCKADDR_IN6 DestinationAddress;
     66 } SOCKADDR_IN6_PAIR, *PSOCKADDR_IN6_PAIR;
     67 
     68 typedef union _SOCKADDR_INET {
     69   SOCKADDR_IN    Ipv4;
     70   SOCKADDR_IN6   Ipv6;
     71   ADDRESS_FAMILY si_family;
     72 } SOCKADDR_INET, *PSOCKADDR_INET;
     73 
     74 typedef struct group_filter {
     75   ULONG               gf_interface;
     76   SOCKADDR_STORAGE    gf_group;
     77   MULTICAST_MODE_TYPE gf_fmode;
     78   ULONG               gf_numsrc;
     79   SOCKADDR_STORAGE    gf_slist[1];
     80 } GROUP_FILTER, *PGROUP_FILTER;
     81 
     82 typedef struct group_req {
     83   ULONG            gr_interface;
     84   SOCKADDR_STORAGE gr_group;
     85 } GROUP_REQ, *PGROUP_REQ;
     86 
     87 typedef struct group_source_req {
     88   ULONG            gsr_interface;
     89   SOCKADDR_STORAGE gsr_group;
     90   SOCKADDR_STORAGE gsr_source;
     91 } GROUP_SOURCE_REQ, *PGROUP_SOURCE_REQ;
     92 
     93 #define IPV6_HOPOPTS           1
     94 #define IPV6_HDRINCL           2
     95 #define IPV6_UNICAST_HOPS      4
     96 #define IPV6_MULTICAST_IF      9
     97 #define IPV6_MULTICAST_HOPS    10
     98 #define IPV6_MULTICAST_LOOP    11
     99 #define IPV6_ADD_MEMBERSHIP    12
    100 #define IPV6_JOIN_GROUP        IPV6_ADD_MEMBERSHIP
    101 #define IPV6_DROP_MEMBERSHIP   13
    102 #define IPV6_LEAVE_GROUP       IPV6_DROP_MEMBERSHIP
    103 #define IPV6_DONTFRAG          14
    104 #define IPV6_PKTINFO           19
    105 #define IPV6_HOPLIMIT          21
    106 #define IPV6_PROTECTION_LEVEL  23
    107 #define IPV6_RECVIF            24
    108 #define IPV6_RECVDSTADDR       25
    109 #define IPV6_CHECKSUM          26
    110 #define IPV6_V6ONLY            27
    111 #define IPV6_IFLIST            28
    112 #define IPV6_ADD_IFLIST        29
    113 #define IPV6_DEL_IFLIST        30
    114 #define IPV6_UNICAST_IF        31
    115 #define IPV6_RTHDR             32
    116 #define IPV6_RECVRTHDR         38
    117 #define IPV6_TCLASS            39
    118 #define IPV6_RECVTCLASS        40
    119 
    120 #ifdef __cplusplus
    121 }
    122 #endif
    123 
    124 #endif /* WINAPI_PARTION_DESKTOP.  */
    125 
    126 #endif /*_INC_WS2IPDEF*/
    127