1 | //////////////////////////////////////////////////////////////////////////////// |
---|
2 | // Copyright (c) 2004 Xilinx, Inc. All rights reserved. |
---|
3 | // |
---|
4 | // Xilinx, Inc. |
---|
5 | // XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A |
---|
6 | // COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS |
---|
7 | // ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR |
---|
8 | // STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION |
---|
9 | // IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE |
---|
10 | // FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. |
---|
11 | // XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO |
---|
12 | // THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO |
---|
13 | // ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE |
---|
14 | // FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY |
---|
15 | // AND FITNESS FOR A PARTICULAR PURPOSE. |
---|
16 | // |
---|
17 | // File : in.h |
---|
18 | // Date : 2002, March 20. |
---|
19 | // Author : Sathya Thammanur |
---|
20 | // Company: Xilinx |
---|
21 | // Group : Emerging Software Technologies |
---|
22 | // |
---|
23 | // Summary: |
---|
24 | // Header file for Internet related socket definitions |
---|
25 | // |
---|
26 | // $Id: in.h,v 1.2.8.6 2005/11/15 23:41:10 salindac Exp $ |
---|
27 | // |
---|
28 | //////////////////////////////////////////////////////////////////////////////// |
---|
29 | |
---|
30 | //////////////////////////////////////////////////////////////////////////////// |
---|
31 | // see copyright.txt for Rice University/Mango Communications modifications |
---|
32 | //////////////////////////////////////////////////////////////////////////////// |
---|
33 | |
---|
34 | #ifndef _IN_H |
---|
35 | #define _IN_H |
---|
36 | |
---|
37 | #ifdef __cplusplus |
---|
38 | extern "C" { |
---|
39 | #endif |
---|
40 | |
---|
41 | struct in_addr { |
---|
42 | unsigned int s_addr; |
---|
43 | }; |
---|
44 | |
---|
45 | |
---|
46 | // structure for internet socket |
---|
47 | |
---|
48 | #define SOCKET_SIZE 16 /* sizeof(struct sockaddr) */ |
---|
49 | struct sockaddr_in { |
---|
50 | unsigned short sin_family; /* Address family */ |
---|
51 | unsigned short sin_port ; /* Port number */ |
---|
52 | struct in_addr sin_addr ; /* Internet addr. */ |
---|
53 | |
---|
54 | /* Pad to size of `struct sockaddr'. */ |
---|
55 | unsigned char pad[SOCKET_SIZE |
---|
56 | - sizeof(unsigned short) |
---|
57 | - sizeof(unsigned short) |
---|
58 | - sizeof(struct in_addr)]; |
---|
59 | }; |
---|
60 | |
---|
61 | |
---|
62 | // Accept on any interface |
---|
63 | #define INADDR_ANY ((unsigned int) 0x00000000) |
---|
64 | |
---|
65 | #ifdef __cplusplus |
---|
66 | } |
---|
67 | #endif |
---|
68 | |
---|
69 | #endif /* _IN_H */ |
---|