]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.h
2 Definitions for the raw IP4 transmit application
4 Copyright (c) 2011-2012, Intel Corporation. All rights reserved.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #define _RAW_IP4_TX_H_
12 //------------------------------------------------------------------------------
14 //------------------------------------------------------------------------------
16 #ifdef BUILD_FOR_WINDOWS
18 // Build for Windows environment
24 #define CLOSE_SOCKET closesocket
25 #define EINVAL 22 // Invalid argument
26 #define GET_ERRNO WSAGetLastError ( )
27 #define SIN_ADDR(port) port.sin_addr.S_un.S_addr
28 #define SIN_FAMILY(port) port.sin_family
29 #define SIN_LEN(port) port.sin_family
30 #define SIN_PORT(port) port.sin_port
34 #else // BUILD_FOR_WINDOWS
36 // Build for EFI environment
44 #include <netinet/in.h>
46 #include <sys/EfiSysCall.h>
47 #include <sys/endian.h>
48 #include <sys/socket.h>
50 #define CLOSE_SOCKET close
51 #define GET_ERRNO errno
52 #define SIN_ADDR(port) port.sin_addr.s_addr
53 #define SIN_FAMILY(port) port.sin_family
54 #define SIN_LEN(port) port.sin_len
55 #define SIN_PORT(port) port.sin_port
58 #endif // BUILD_FOR_WINDOWS
62 //------------------------------------------------------------------------------
64 //------------------------------------------------------------------------------
67 // See http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
68 // and http://tools.ietf.org/html/rfc3692
70 #define RAW_PROTOCOL 253
72 //------------------------------------------------------------------------------
74 //------------------------------------------------------------------------------
77 Transmit raw IP4 packets to the remote system.
79 @param [in] ArgC Argument count
80 @param [in] ArgV Argument value array
82 @retval 0 Successfully operation
91 //------------------------------------------------------------------------------
93 #endif // _RAW_IP4_TX_H_