]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Sockets/OobTx/OobTx.h
2 Definitions for the OOB Transmit application
4 Copyright (c) 2011-2012, Intel Corporation. All rights reserved.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
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 //------------------------------------------------------------------------------
66 #define OOB_RX_PORT 12344
68 #define TX_MSGS_BEFORE 32
69 #define TX_MSGS_AFTER 8
71 //------------------------------------------------------------------------------
73 //------------------------------------------------------------------------------
76 Transmit out-of-band messages to the remote system.
78 @param [in] ArgC Argument count
79 @param [in] ArgV Argument value array
81 @retval 0 Successfully operation
90 //------------------------------------------------------------------------------