]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Sockets/OobRx/OobRx.h
13b6539fac0f7943042a38d206cf17e0b385070a
2 Definitions for the OOB Receive 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
23 #define CLOSE_SOCKET closesocket
24 #define SIN_ADDR(port) port.sin_addr.S_un.S_addr
25 #define SIN_FAMILY(port) port.sin_family
26 #define SIN_LEN(port) port.sin_family
27 #define SIN_PORT(port) port.sin_port
28 #define GET_ERRNO WSAGetLastError ( )
30 #define RX_TIMEOUT_ERROR WSAETIMEDOUT
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>
51 #define CLOSE_SOCKET close
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
57 #define GET_ERRNO errno
58 #define RX_TIMEOUT_ERROR ETIMEDOUT
60 #endif // BUILD_FOR_WINDOWS
64 //------------------------------------------------------------------------------
66 //------------------------------------------------------------------------------
68 #define OOB_RX_PORT 12344
70 //------------------------------------------------------------------------------
72 //------------------------------------------------------------------------------
75 Run the OOB receive application
77 @param [in] ArgC Argument count
78 @param [in] ArgV Argument value array
80 @retval 0 Successfully operation
89 //------------------------------------------------------------------------------