]>
Commit | Line | Data |
---|---|---|
59bc0593 | 1 | /** @file\r |
2 | Windows version of the raw IP4 receive application\r | |
3 | \r | |
9f7f5161 | 4 | Copyright (c) 2011-2012, Intel Corporation\r |
59bc0593 | 5 | All rights reserved. This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #include <RawIp4Rx.h>\r | |
16 | \r | |
17 | \r | |
18 | /**\r | |
19 | Receive raw IP4 packets from a remote system.\r | |
20 | \r | |
21 | Please note that this program must be run with administrator privileges!\r | |
22 | \r | |
23 | @param [in] argc The number of arguments\r | |
24 | @param [in] argv The argument value array\r | |
25 | \r | |
26 | @retval 0 The application exited normally.\r | |
27 | @retval Other An error occurred.\r | |
28 | **/\r | |
29 | int\r | |
30 | main(\r | |
31 | int argc,\r | |
32 | char ** argv\r | |
33 | )\r | |
34 | {\r | |
35 | int RetVal;\r | |
36 | WSADATA WsaData;\r | |
37 | \r | |
38 | //\r | |
39 | // Initialize the WinSock layer\r | |
40 | //\r | |
41 | RetVal = WSAStartup ( MAKEWORD ( 2, 2 ), &WsaData );\r | |
42 | if ( 0 == RetVal ) {\r | |
43 | //\r | |
44 | // Start the application\r | |
45 | //\r | |
46 | RetVal = RawIp4Rx ( argc, argv );\r | |
47 | if ( WSAEACCES == RetVal ) {\r | |
48 | printf ( "Requires administrator privileges to run!\r\n" );\r | |
49 | }\r | |
50 | \r | |
51 | //\r | |
52 | // Done with the WinSock layer\r | |
53 | //\r | |
54 | WSACleanup ( );\r | |
55 | }\r | |
56 | \r | |
57 | //\r | |
58 | // Return the final result\r | |
59 | //\r | |
60 | return RetVal; \r | |
61 | }\r |