1*530d68baSNigel Croxon #ifndef _EFI_UDP_H 2*530d68baSNigel Croxon #define _EFI_UDP_H 3*530d68baSNigel Croxon 4*530d68baSNigel Croxon 5*530d68baSNigel Croxon /*++ 6*530d68baSNigel Croxon Copyright (c) 2013 Intel Corporation 7*530d68baSNigel Croxon 8*530d68baSNigel Croxon --*/ 9*530d68baSNigel Croxon 10*530d68baSNigel Croxon #define EFI_UDP4_SERVICE_BINDING_PROTOCOL \ 11*530d68baSNigel Croxon { 0x83f01464, 0x99bd, 0x45e5, {0xb3, 0x83, 0xaf, 0x63, 0x05, 0xd8, 0xe9, 0xe6} } 12*530d68baSNigel Croxon 13*530d68baSNigel Croxon #define EFI_UDP4_PROTOCOL \ 14*530d68baSNigel Croxon { 0x3ad9df29, 0x4501, 0x478d, {0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3} } 15*530d68baSNigel Croxon 16*530d68baSNigel Croxon #define EFI_UDP6_SERVICE_BINDING_PROTOCOL \ 17*530d68baSNigel Croxon { 0x66ed4721, 0x3c98, 0x4d3e, {0x81, 0xe3, 0xd0, 0x3d, 0xd3, 0x9a, 0x72, 0x54} } 18*530d68baSNigel Croxon 19*530d68baSNigel Croxon #define EFI_UDP6_PROTOCOL \ 20*530d68baSNigel Croxon { 0x4f948815, 0xb4b9, 0x43cb, {0x8a, 0x33, 0x90, 0xe0, 0x60, 0xb3,0x49, 0x55} } 21*530d68baSNigel Croxon 22*530d68baSNigel Croxon INTERFACE_DECL(_EFI_UDP4); 23*530d68baSNigel Croxon INTERFACE_DECL(_EFI_UDP6); 24*530d68baSNigel Croxon 25*530d68baSNigel Croxon typedef struct { 26*530d68baSNigel Croxon BOOLEAN AcceptBroadcast; 27*530d68baSNigel Croxon BOOLEAN AcceptPromiscuous; 28*530d68baSNigel Croxon BOOLEAN AcceptAnyPort; 29*530d68baSNigel Croxon BOOLEAN AllowDuplicatePort; 30*530d68baSNigel Croxon UINT8 TypeOfService; 31*530d68baSNigel Croxon UINT8 TimeToLive; 32*530d68baSNigel Croxon BOOLEAN DoNotFragment; 33*530d68baSNigel Croxon UINT32 ReceiveTimeout; 34*530d68baSNigel Croxon UINT32 TransmitTimeout; 35*530d68baSNigel Croxon BOOLEAN UseDefaultAddress; 36*530d68baSNigel Croxon EFI_IPv4_ADDRESS StationAddress; 37*530d68baSNigel Croxon EFI_IPv4_ADDRESS SubnetMask; 38*530d68baSNigel Croxon UINT16 StationPort; 39*530d68baSNigel Croxon EFI_IPv4_ADDRESS RemoteAddress; 40*530d68baSNigel Croxon UINT16 RemotePort; 41*530d68baSNigel Croxon } EFI_UDP4_CONFIG_DATA; 42*530d68baSNigel Croxon 43*530d68baSNigel Croxon typedef 44*530d68baSNigel Croxon EFI_STATUS 45*530d68baSNigel Croxon (EFIAPI *EFI_UDP4_GET_MODE_DATA) ( 46*530d68baSNigel Croxon IN struct _EFI_UDP4 *This, 47*530d68baSNigel Croxon OUT EFI_UDP4_CONFIG_DATA *Udp4ConfigData OPTIONAL, 48*530d68baSNigel Croxon OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, 49*530d68baSNigel Croxon OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, 50*530d68baSNigel Croxon OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL 51*530d68baSNigel Croxon ); 52*530d68baSNigel Croxon 53*530d68baSNigel Croxon typedef 54*530d68baSNigel Croxon EFI_STATUS 55*530d68baSNigel Croxon (EFIAPI *EFI_UDP4_CONFIGURE) ( 56*530d68baSNigel Croxon IN struct _EFI_UDP4 *This, 57*530d68baSNigel Croxon IN EFI_UDP4_CONFIG_DATA *UdpConfigData OPTIONAL 58*530d68baSNigel Croxon ); 59*530d68baSNigel Croxon 60*530d68baSNigel Croxon typedef 61*530d68baSNigel Croxon EFI_STATUS 62*530d68baSNigel Croxon (EFIAPI *EFI_UDP4_GROUPS) ( 63*530d68baSNigel Croxon IN struct _EFI_UDP4 *This, 64*530d68baSNigel Croxon IN BOOLEAN JoinFlag, 65*530d68baSNigel Croxon IN EFI_IPv4_ADDRESS *MulticastAddress OPTIONAL 66*530d68baSNigel Croxon ); 67*530d68baSNigel Croxon 68*530d68baSNigel Croxon typedef 69*530d68baSNigel Croxon EFI_STATUS 70*530d68baSNigel Croxon (EFIAPI *EFI_UDP4_ROUTES) ( 71*530d68baSNigel Croxon IN struct _EFI_UDP4 *This, 72*530d68baSNigel Croxon IN BOOLEAN DeleteRoute, 73*530d68baSNigel Croxon IN EFI_IPv4_ADDRESS *SubnetAddress, 74*530d68baSNigel Croxon IN EFI_IPv4_ADDRESS *SubnetMask, 75*530d68baSNigel Croxon IN EFI_IPv4_ADDRESS *GatewayAddress 76*530d68baSNigel Croxon ); 77*530d68baSNigel Croxon 78*530d68baSNigel Croxon #define EFI_NETWORK_UNREACHABLE EFIERR(100) 79*530d68baSNigel Croxon #define EFI_HOST_UNREACHABLE EFIERR(101) 80*530d68baSNigel Croxon #define EFI_PROTOCOL_UNREACHABLE EFIERR(102) 81*530d68baSNigel Croxon #define EFI_PORT_UNREACHABLE EFIERR(103) 82*530d68baSNigel Croxon 83*530d68baSNigel Croxon typedef struct { 84*530d68baSNigel Croxon EFI_IPv4_ADDRESS SourceAddress; 85*530d68baSNigel Croxon UINT16 SourcePort; 86*530d68baSNigel Croxon EFI_IPv4_ADDRESS DestinationAddress; 87*530d68baSNigel Croxon UINT16 DestinationPort; 88*530d68baSNigel Croxon } EFI_UDP4_SESSION_DATA; 89*530d68baSNigel Croxon 90*530d68baSNigel Croxon typedef struct { 91*530d68baSNigel Croxon UINT32 FragmentLength; 92*530d68baSNigel Croxon VOID *FragmentBuffer; 93*530d68baSNigel Croxon } EFI_UDP4_FRAGMENT_DATA; 94*530d68baSNigel Croxon 95*530d68baSNigel Croxon typedef struct { 96*530d68baSNigel Croxon EFI_TIME TimeStamp; 97*530d68baSNigel Croxon EFI_EVENT RecycleSignal; 98*530d68baSNigel Croxon EFI_UDP4_SESSION_DATA UdpSession; 99*530d68baSNigel Croxon UINT32 DataLength; 100*530d68baSNigel Croxon UINT32 FragmentCount; 101*530d68baSNigel Croxon EFI_UDP4_FRAGMENT_DATA FragmentTable[1]; 102*530d68baSNigel Croxon } EFI_UDP4_RECEIVE_DATA; 103*530d68baSNigel Croxon 104*530d68baSNigel Croxon typedef struct { 105*530d68baSNigel Croxon EFI_UDP4_SESSION_DATA *UdpSessionData; 106*530d68baSNigel Croxon EFI_IPv4_ADDRESS *GatewayAddress; 107*530d68baSNigel Croxon UINT32 DataLength; 108*530d68baSNigel Croxon UINT32 FragmentCount; 109*530d68baSNigel Croxon EFI_UDP4_FRAGMENT_DATA FragmentTable[1]; 110*530d68baSNigel Croxon } EFI_UDP4_TRANSMIT_DATA; 111*530d68baSNigel Croxon 112*530d68baSNigel Croxon typedef struct { 113*530d68baSNigel Croxon EFI_EVENT Event; 114*530d68baSNigel Croxon EFI_STATUS Status; 115*530d68baSNigel Croxon union { 116*530d68baSNigel Croxon EFI_UDP4_RECEIVE_DATA *RxData; 117*530d68baSNigel Croxon EFI_UDP4_TRANSMIT_DATA *TxData; 118*530d68baSNigel Croxon } Packet; 119*530d68baSNigel Croxon } EFI_UDP4_COMPLETION_TOKEN; 120*530d68baSNigel Croxon 121*530d68baSNigel Croxon typedef 122*530d68baSNigel Croxon EFI_STATUS 123*530d68baSNigel Croxon (EFIAPI *EFI_UDP4_TRANSMIT) ( 124*530d68baSNigel Croxon IN struct _EFI_UDP4 *This, 125*530d68baSNigel Croxon IN EFI_UDP4_COMPLETION_TOKEN *Token 126*530d68baSNigel Croxon ); 127*530d68baSNigel Croxon 128*530d68baSNigel Croxon typedef 129*530d68baSNigel Croxon EFI_STATUS 130*530d68baSNigel Croxon (EFIAPI *EFI_UDP4_RECEIVE) ( 131*530d68baSNigel Croxon IN struct _EFI_UDP4 *This, 132*530d68baSNigel Croxon IN EFI_UDP4_COMPLETION_TOKEN *Token 133*530d68baSNigel Croxon ); 134*530d68baSNigel Croxon 135*530d68baSNigel Croxon typedef 136*530d68baSNigel Croxon EFI_STATUS 137*530d68baSNigel Croxon (EFIAPI *EFI_UDP4_CANCEL)( 138*530d68baSNigel Croxon IN struct _EFI_UDP4 *This, 139*530d68baSNigel Croxon IN EFI_UDP4_COMPLETION_TOKEN *Token OPTIONAL 140*530d68baSNigel Croxon ); 141*530d68baSNigel Croxon 142*530d68baSNigel Croxon typedef 143*530d68baSNigel Croxon EFI_STATUS 144*530d68baSNigel Croxon (EFIAPI *EFI_UDP4_POLL) ( 145*530d68baSNigel Croxon IN struct _EFI_UDP4 *This 146*530d68baSNigel Croxon ); 147*530d68baSNigel Croxon 148*530d68baSNigel Croxon typedef struct _EFI_UDP4 { 149*530d68baSNigel Croxon EFI_UDP4_GET_MODE_DATA GetModeData; 150*530d68baSNigel Croxon EFI_UDP4_CONFIGURE Configure; 151*530d68baSNigel Croxon EFI_UDP4_GROUPS Groups; 152*530d68baSNigel Croxon EFI_UDP4_ROUTES Routes; 153*530d68baSNigel Croxon EFI_UDP4_TRANSMIT Transmit; 154*530d68baSNigel Croxon EFI_UDP4_RECEIVE Receive; 155*530d68baSNigel Croxon EFI_UDP4_CANCEL Cancel; 156*530d68baSNigel Croxon EFI_UDP4_POLL Poll; 157*530d68baSNigel Croxon } EFI_UDP4; 158*530d68baSNigel Croxon 159*530d68baSNigel Croxon typedef struct { 160*530d68baSNigel Croxon BOOLEAN AcceptPromiscuous; 161*530d68baSNigel Croxon BOOLEAN AcceptAnyPort; 162*530d68baSNigel Croxon BOOLEAN AllowDuplicatePort; 163*530d68baSNigel Croxon UINT8 TrafficClass; 164*530d68baSNigel Croxon UINT8 HopLimit; 165*530d68baSNigel Croxon UINT32 ReceiveTimeout; 166*530d68baSNigel Croxon UINT32 TransmitTimeout; 167*530d68baSNigel Croxon EFI_IPv6_ADDRESS StationAddress; 168*530d68baSNigel Croxon UINT16 StationPort; 169*530d68baSNigel Croxon EFI_IPv6_ADDRESS RemoteAddress; 170*530d68baSNigel Croxon UINT16 RemotePort; 171*530d68baSNigel Croxon } EFI_UDP6_CONFIG_DATA; 172*530d68baSNigel Croxon 173*530d68baSNigel Croxon typedef 174*530d68baSNigel Croxon EFI_STATUS 175*530d68baSNigel Croxon (EFIAPI *EFI_UDP6_GET_MODE_DATA) ( 176*530d68baSNigel Croxon IN struct _EFI_UDP6 *This, 177*530d68baSNigel Croxon OUT EFI_UDP6_CONFIG_DATA *Udp6ConfigData OPTIONAL, 178*530d68baSNigel Croxon OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL, 179*530d68baSNigel Croxon OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, 180*530d68baSNigel Croxon OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL 181*530d68baSNigel Croxon ); 182*530d68baSNigel Croxon 183*530d68baSNigel Croxon typedef 184*530d68baSNigel Croxon EFI_STATUS 185*530d68baSNigel Croxon (EFIAPI *EFI_UDP6_CONFIGURE) ( 186*530d68baSNigel Croxon IN struct _EFI_UDP6 *This, 187*530d68baSNigel Croxon IN EFI_UDP6_CONFIG_DATA *UdpConfigData OPTIONAL 188*530d68baSNigel Croxon ); 189*530d68baSNigel Croxon 190*530d68baSNigel Croxon typedef 191*530d68baSNigel Croxon EFI_STATUS 192*530d68baSNigel Croxon (EFIAPI *EFI_UDP6_GROUPS) ( 193*530d68baSNigel Croxon IN struct _EFI_UDP6 *This, 194*530d68baSNigel Croxon IN BOOLEAN JoinFlag, 195*530d68baSNigel Croxon IN EFI_IPv6_ADDRESS *MulticastAddress OPTIONAL 196*530d68baSNigel Croxon ); 197*530d68baSNigel Croxon 198*530d68baSNigel Croxon typedef struct { 199*530d68baSNigel Croxon EFI_IPv6_ADDRESS SourceAddress; 200*530d68baSNigel Croxon UINT16 SourcePort; 201*530d68baSNigel Croxon EFI_IPv6_ADDRESS DestinationAddress; 202*530d68baSNigel Croxon UINT16 DestinationPort; 203*530d68baSNigel Croxon } EFI_UDP6_SESSION_DATA; 204*530d68baSNigel Croxon 205*530d68baSNigel Croxon typedef struct { 206*530d68baSNigel Croxon UINT32 FragmentLength; 207*530d68baSNigel Croxon VOID *FragmentBuffer; 208*530d68baSNigel Croxon } EFI_UDP6_FRAGMENT_DATA; 209*530d68baSNigel Croxon 210*530d68baSNigel Croxon typedef struct { 211*530d68baSNigel Croxon EFI_TIME TimeStamp; 212*530d68baSNigel Croxon EFI_EVENT RecycleSignal; 213*530d68baSNigel Croxon EFI_UDP6_SESSION_DATA UdpSession; 214*530d68baSNigel Croxon UINT32 DataLength; 215*530d68baSNigel Croxon UINT32 FragmentCount; 216*530d68baSNigel Croxon EFI_UDP6_FRAGMENT_DATA FragmentTable[1]; 217*530d68baSNigel Croxon } EFI_UDP6_RECEIVE_DATA; 218*530d68baSNigel Croxon 219*530d68baSNigel Croxon typedef struct { 220*530d68baSNigel Croxon EFI_UDP6_SESSION_DATA *UdpSessionData; 221*530d68baSNigel Croxon UINT32 DataLength; 222*530d68baSNigel Croxon UINT32 FragmentCount; 223*530d68baSNigel Croxon EFI_UDP6_FRAGMENT_DATA FragmentTable[1]; 224*530d68baSNigel Croxon } EFI_UDP6_TRANSMIT_DATA; 225*530d68baSNigel Croxon 226*530d68baSNigel Croxon typedef struct { 227*530d68baSNigel Croxon EFI_EVENT Event; 228*530d68baSNigel Croxon EFI_STATUS Status; 229*530d68baSNigel Croxon union { 230*530d68baSNigel Croxon EFI_UDP6_RECEIVE_DATA *RxData; 231*530d68baSNigel Croxon EFI_UDP6_TRANSMIT_DATA *TxData; 232*530d68baSNigel Croxon } Packet; 233*530d68baSNigel Croxon } EFI_UDP6_COMPLETION_TOKEN; 234*530d68baSNigel Croxon 235*530d68baSNigel Croxon typedef 236*530d68baSNigel Croxon EFI_STATUS 237*530d68baSNigel Croxon (EFIAPI *EFI_UDP6_TRANSMIT) ( 238*530d68baSNigel Croxon IN struct _EFI_UDP6 *This, 239*530d68baSNigel Croxon IN EFI_UDP6_COMPLETION_TOKEN *Token 240*530d68baSNigel Croxon ); 241*530d68baSNigel Croxon 242*530d68baSNigel Croxon typedef 243*530d68baSNigel Croxon EFI_STATUS 244*530d68baSNigel Croxon (EFIAPI *EFI_UDP6_RECEIVE) ( 245*530d68baSNigel Croxon IN struct _EFI_UDP6 *This, 246*530d68baSNigel Croxon IN EFI_UDP6_COMPLETION_TOKEN *Token 247*530d68baSNigel Croxon ); 248*530d68baSNigel Croxon 249*530d68baSNigel Croxon typedef 250*530d68baSNigel Croxon EFI_STATUS 251*530d68baSNigel Croxon (EFIAPI *EFI_UDP6_CANCEL)( 252*530d68baSNigel Croxon IN struct _EFI_UDP6 *This, 253*530d68baSNigel Croxon IN EFI_UDP6_COMPLETION_TOKEN *Token OPTIONAL 254*530d68baSNigel Croxon ); 255*530d68baSNigel Croxon 256*530d68baSNigel Croxon typedef 257*530d68baSNigel Croxon EFI_STATUS 258*530d68baSNigel Croxon (EFIAPI *EFI_UDP6_POLL) ( 259*530d68baSNigel Croxon IN struct _EFI_UDP6 *This 260*530d68baSNigel Croxon ); 261*530d68baSNigel Croxon 262*530d68baSNigel Croxon typedef struct _EFI_UDP6 { 263*530d68baSNigel Croxon EFI_UDP6_GET_MODE_DATA GetModeData; 264*530d68baSNigel Croxon EFI_UDP6_CONFIGURE Configure; 265*530d68baSNigel Croxon EFI_UDP6_GROUPS Groups; 266*530d68baSNigel Croxon EFI_UDP6_TRANSMIT Transmit; 267*530d68baSNigel Croxon EFI_UDP6_RECEIVE Receive; 268*530d68baSNigel Croxon EFI_UDP6_CANCEL Cancel; 269*530d68baSNigel Croxon EFI_UDP6_POLL Poll; 270*530d68baSNigel Croxon } EFI_UDP6; 271*530d68baSNigel Croxon 272*530d68baSNigel Croxon #endif /* _EFI_UDP_H */ 273