]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Sockets/OobRx/OobRx.h
cd31ddc2d422b62b943e5f81e6421c99781947d5
2 Definitions for the OOB Receive application
4 Copyright (c) 2011, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 //------------------------------------------------------------------------------
20 //------------------------------------------------------------------------------
22 #ifdef BUILD_FOR_WINDOWS
24 // Build for Windows environment
29 #define CLOSE_SOCKET closesocket
30 #define SIN_ADDR(port) port.sin_addr.S_un.S_addr
31 #define SIN_FAMILY(port) port.sin_family
32 #define SIN_LEN(port) port.sin_family
33 #define SIN_PORT(port) port.sin_port
34 #define GET_ERRNO WSAGetLastError ( )
36 #define RX_TIMEOUT_ERROR WSAETIMEDOUT
40 #else // BUILD_FOR_WINDOWS
42 // Build for EFI environment
50 #include <netinet/in.h>
52 #include <sys/EfiSysCall.h>
53 #include <sys/endian.h>
54 #include <sys/socket.h>
57 #define CLOSE_SOCKET close
58 #define SIN_ADDR(port) port.sin_addr.s_addr
59 #define SIN_FAMILY(port) port.sin_family
60 #define SIN_LEN(port) port.sin_len
61 #define SIN_PORT(port) port.sin_port
63 #define GET_ERRNO errno
64 #define RX_TIMEOUT_ERROR ETIMEDOUT
66 #endif // BUILD_FOR_WINDOWS
70 //------------------------------------------------------------------------------
72 //------------------------------------------------------------------------------
74 #define OOB_RX_PORT 12344
76 //------------------------------------------------------------------------------
78 //------------------------------------------------------------------------------
81 Run the OOB receive application
83 @param [in] ArgC Argument count
84 @param [in] ArgV Argument value array
86 @retval 0 Successfully operation
95 //------------------------------------------------------------------------------