/usr/x86_64-w64-mingw32/include/rtm.h is in mingw-w64-x86-64-dev 2.0.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | /**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef __ROUTING_RTM_H__
#define __ROUTING_RTM_H__
#ifdef __cplusplus
extern "C" {
#endif
#define RTM_PROTOCOL_FAMILY_IPX 0
#define RTM_PROTOCOL_FAMILY_IP 1
#define ERROR_MORE_MESSAGES ERROR_MORE_DATA
#define ERROR_CLIENT_ALREADY_EXISTS ERROR_ALREADY_EXISTS
#define ERROR_NO_MESSAGES ERROR_NO_MORE_ITEMS
#define ERROR_NO_MORE_ROUTES ERROR_NO_MORE_ITEMS
#define ERROR_NO_ROUTES ERROR_NO_MORE_ITEMS
#define ERROR_NO_SUCH_ROUTE ERROR_NO_MORE_ITEMS
typedef struct _IPX_NETWORK {
DWORD N_NetNumber;
} IPX_NETWORK,*PIPX_NETWORK;
typedef struct _IP_NETWORK {
DWORD N_NetNumber;
DWORD N_NetMask;
} IP_NETWORK,*PIP_NETWORK;
typedef struct _IPX_NEXT_HOP_ADDRESS {
BYTE NHA_Mac[6];
} IPX_NEXT_HOP_ADDRESS,*PIPX_NEXT_HOP_ADDRESS;
typedef IP_NETWORK IP_NEXT_HOP_ADDRESS,*PIP_NEXT_HOP_ADDRESS;
typedef struct _IPX_SPECIFIC_DATA {
DWORD FSD_Flags;
USHORT FSD_TickCount;
USHORT FSD_HopCount;
} IPX_SPECIFIC_DATA,*PIPX_SPECIFIC_DATA;
#define IPX_GLOBAL_CLIENT_WAN_ROUTE 0x00000001
typedef struct _IP_SPECIFIC_DATA {
DWORD FSD_Type;
DWORD FSD_Policy;
DWORD FSD_NextHopAS;
DWORD FSD_Priority;
DWORD FSD_Metric;
DWORD FSD_Metric1;
DWORD FSD_Metric2;
DWORD FSD_Metric3;
DWORD FSD_Metric4;
DWORD FSD_Metric5;
DWORD FSD_Flags;
} IP_SPECIFIC_DATA,*PIP_SPECIFIC_DATA;
#define IP_VALID_ROUTE 0x00000001
#define ClearRouteFlags(pRoute) ((pRoute)->RR_FamilySpecificData.FSD_Flags = 0x00000000)
#define IsRouteValid(pRoute) ((pRoute)->RR_FamilySpecificData.FSD_Flags & IP_VALID_ROUTE)
#define SetRouteValid(pRoute) ((pRoute)->RR_FamilySpecificData.FSD_Flags |= IP_VALID_ROUTE)
#define ClearRouteValid(pRoute) ((pRoute)->RR_FamilySpecificData.FSD_Flags &= ~IP_VALID_ROUTE)
#define IsRouteNonUnicast(pRoute) (((DWORD)((pRoute)->RR_Network.N_NetNumber & 0x000000FF)) >= ((DWORD)0x000000E0))
#define IsRouteLoopback(pRoute) ((((pRoute)->RR_Network.N_NetNumber & 0x000000FF)==0x0000007F) || ((pRoute)->RR_NextHopAddress.N_NetNumber==0x0100007F))
typedef struct _PROTOCOL_SPECIFIC_DATA {
DWORD PSD_Data[4];
} PROTOCOL_SPECIFIC_DATA,*PPROTOCOL_SPECIFIC_DATA;
#define DWORD_ALIGN(type,field) union { type field; DWORD field##Align; }
#define ROUTE_HEADER DWORD_ALIGN (FILETIME,RR_TimeStamp); DWORD RR_RoutingProtocol; DWORD RR_InterfaceID; DWORD_ALIGN (PROTOCOL_SPECIFIC_DATA,RR_ProtocolSpecificData)
typedef struct _RTM_IPX_ROUTE {
ROUTE_HEADER;
DWORD_ALIGN (IPX_NETWORK,RR_Network);
DWORD_ALIGN (IPX_NEXT_HOP_ADDRESS,RR_NextHopAddress);
DWORD_ALIGN (IPX_SPECIFIC_DATA,RR_FamilySpecificData);
} RTM_IPX_ROUTE,*PRTM_IPX_ROUTE;
typedef struct _RTM_IP_ROUTE {
ROUTE_HEADER;
DWORD_ALIGN (IP_NETWORK,RR_Network);
DWORD_ALIGN (IP_NEXT_HOP_ADDRESS,RR_NextHopAddress);
DWORD_ALIGN (IP_SPECIFIC_DATA,RR_FamilySpecificData);
} RTM_IP_ROUTE,*PRTM_IP_ROUTE;
#define RTM_CURRENT_BEST_ROUTE 0x00000001
#define RTM_PREVIOUS_BEST_ROUTE 0x00000002
#define RTM_NO_CHANGE 0
#define RTM_ROUTE_ADDED RTM_CURRENT_BEST_ROUTE
#define RTM_ROUTE_DELETED RTM_PREVIOUS_BEST_ROUTE
#define RTM_ROUTE_CHANGED (RTM_CURRENT_BEST_ROUTE|RTM_PREVIOUS_BEST_ROUTE)
#define RTM_ONLY_THIS_NETWORK 0x00000001
#define RTM_ONLY_THIS_INTERFACE 0x00000002
#define RTM_ONLY_THIS_PROTOCOL 0x00000004
#define RTM_ONLY_BEST_ROUTES 0x00000008
#define RTM_PROTOCOL_SINGLE_ROUTE 0x00000001
HANDLE WINAPI RtmRegisterClient(DWORD ProtocolFamily,DWORD RoutingProtocol,HANDLE ChangeEvent,DWORD Flags);
DWORD WINAPI RtmDeregisterClient(HANDLE ClientHandle);
DWORD WINAPI RtmDequeueRouteChangeMessage(HANDLE ClientHandle,DWORD *Flags,PVOID CurBestRoute,PVOID PrevBestRoute);
DWORD WINAPI RtmAddRoute(HANDLE ClientHandle,PVOID Route,DWORD TimeToLive,DWORD *Flags,PVOID CurBestRoute,PVOID PrevBestRoute);
DWORD WINAPI RtmDeleteRoute(HANDLE ClientHandle,PVOID Route,DWORD *Flags,PVOID CurBestRoute);
WINBOOL WINAPI RtmIsRoute(DWORD ProtocolFamily,PVOID Network,PVOID BestRoute);
ULONG WINAPI RtmGetNetworkCount(DWORD ProtocolFamily);
ULONG WINAPI RtmGetRouteAge(PVOID Route);
HANDLE WINAPI RtmCreateEnumerationHandle(DWORD ProtocolFamily,DWORD EnumerationFlags,PVOID CriteriaRoute);
DWORD WINAPI RtmEnumerateGetNextRoute(HANDLE EnumerationHandle,PVOID Route);
DWORD WINAPI RtmCloseEnumerationHandle(HANDLE EnumerationHandle);
DWORD WINAPI RtmBlockDeleteRoutes(HANDLE ClientHandle,DWORD EnumerationFlags,PVOID CriteriaRoute);
DWORD WINAPI RtmGetFirstRoute(DWORD ProtocolFamily,DWORD EnumerationFlags,PVOID Route);
#define RtmGetSpecificRoute(ProtocolFamily,Route) RtmGetFirstRoute(ProtocolFamily,RTM_ONLY_THIS_NETWORK | RTM_ONLY_THIS_PROTOCOL | RTM_ONLY_THIS_INTERFACE,Route)
DWORD WINAPI RtmGetNextRoute(DWORD ProtocolFamily,DWORD EnumerationFlags,PVOID Route);
WINBOOL WINAPI RtmLookupIPDestination(DWORD dwDestAddr,PRTM_IP_ROUTE prir);
#ifdef __cplusplus
}
#endif
#endif
|