headers: Move some structure from ws2tcpip.h to ws2ipdef.h

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
This commit is contained in:
Biswapriyo Nath 2021-03-29 15:06:21 +05:30 committed by Liu Hao
parent fe226dd902
commit e4d49d1262
2 changed files with 50 additions and 35 deletions

View File

@ -119,11 +119,6 @@ extern "C" {
#define PROTECTION_LEVEL_DEFAULT ((UINT)-1)
#endif
typedef struct ip_mreq {
IN_ADDR imr_multiaddr;
IN_ADDR imr_interface;
} IP_MREQ, *PIP_MREQ;
typedef struct ipv6_mreq {
struct in6_addr ipv6mr_multiaddr;
unsigned int ipv6mr_interface;
@ -164,11 +159,60 @@ typedef struct _INTERFACE_INFO {
sockaddr_gen iiNetmask;
} INTERFACE_INFO,*LPINTERFACE_INFO;
typedef struct _INTERFACE_INFO_EX {
u_long iiFlags;
SOCKET_ADDRESS iiAddress;
SOCKET_ADDRESS iiBroadcastAddress;
SOCKET_ADDRESS iiNetmask;
} INTERFACE_INFO_EX, *LPINTERFACE_INFO_EX;
#define IFF_UP 0x00000001
#define IFF_BROADCAST 0x00000002
#define IFF_LOOPBACK 0x00000004
#define IFF_POINTTOPOINT 0x00000008
#define IFF_MULTICAST 0x00000010
typedef enum _PMTUD_STATE {
IP_PMTUDISC_NOT_SET,
IP_PMTUDISC_DO,
IP_PMTUDISC_DONT,
IP_PMTUDISC_PROBE,
IP_PMTUDISC_MAX
} PMTUD_STATE, *PPMTUD_STATE;
#define MCAST_JOIN_GROUP 41
#define MCAST_LEAVE_GROUP 42
#define MCAST_BLOCK_SOURCE 43
#define MCAST_UNBLOCK_SOURCE 44
#define MCAST_JOIN_SOURCE_GROUP 45
#define MCAST_LEAVE_SOURCE_GROUP 46
typedef enum _MULTICAST_MODE_TYPE {
MCAST_INCLUDE = 0,
MCAST_INCLUDE = 0,
MCAST_EXCLUDE
} MULTICAST_MODE_TYPE;
typedef struct ip_mreq {
IN_ADDR imr_multiaddr;
IN_ADDR imr_interface;
} IP_MREQ, *PIP_MREQ;
typedef struct ip_mreq_source {
IN_ADDR imr_multiaddr;
IN_ADDR imr_sourceaddr;
IN_ADDR imr_interface;
} IP_MREQ_SOURCE, *PIP_MREQ_SOURCE;
typedef struct ip_msfilter {
IN_ADDR imsf_multiaddr;
IN_ADDR imsf_interface;
MULTICAST_MODE_TYPE imsf_fmode;
ULONG imsf_numsrc;
IN_ADDR imsf_slist[1];
} IP_MSFILTER, *PIP_MSFILTER;
#define IP_MSFILTER_SIZE(NumSources) (sizeof(IP_MSFILTER) - sizeof(IN_ADDR) + (NumSources) * sizeof(IN_ADDR))
typedef struct _sockaddr_in6_pair {
PSOCKADDR_IN6 SourceAddress;
PSOCKADDR_IN6 DestinationAddress;

View File

@ -19,22 +19,6 @@
#include <psdk_inc/_ip_mreq1.h>
#include <winapifamily.h>
struct ip_mreq_source {
struct in_addr imr_multiaddr;
struct in_addr imr_sourceaddr;
struct in_addr imr_interface;
};
struct ip_msfilter {
struct in_addr imsf_multiaddr;
struct in_addr imsf_interface;
u_long imsf_fmode;
u_long imsf_numsrc;
struct in_addr imsf_slist[1];
};
#define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter)-sizeof(struct in_addr) + (numsrc)*sizeof(struct in_addr))
#define SIO_GET_INTERFACE_LIST _IOR('t',127,u_long)
#define SIO_GET_INTERFACE_LIST_EX _IOR('t',126,u_long)
@ -133,19 +117,6 @@ WS2TCPIP_INLINE void IN6ADDR_SETLOOPBACK(struct sockaddr_in6 *a) {
}
#endif
typedef struct _INTERFACE_INFO_EX {
u_long iiFlags;
SOCKET_ADDRESS iiAddress;
SOCKET_ADDRESS iiBroadcastAddress;
SOCKET_ADDRESS iiNetmask;
} INTERFACE_INFO_EX,*LPINTERFACE_INFO_EX;
#define IFF_UP 0x00000001
#define IFF_BROADCAST 0x00000002
#define IFF_LOOPBACK 0x00000004
#define IFF_POINTTOPOINT 0x00000008
#define IFF_MULTICAST 0x00000010
typedef struct in_pktinfo {
IN_ADDR ipi_addr;
UINT ipi_ifindex;