2 |
7u83 |
1 |
# Crown Copyright (c) 1997
|
|
|
2 |
#
|
|
|
3 |
# This TenDRA(r) Computer Program is subject to Copyright
|
|
|
4 |
# owned by the United Kingdom Secretary of State for Defence
|
|
|
5 |
# acting through the Defence Evaluation and Research Agency
|
|
|
6 |
# (DERA). It is made available to Recipients with a
|
|
|
7 |
# royalty-free licence for its use, reproduction, transfer
|
|
|
8 |
# to other parties and amendment for any purpose not excluding
|
|
|
9 |
# product development provided that any such use et cetera
|
|
|
10 |
# shall be deemed to be acceptance of the following conditions:-
|
|
|
11 |
#
|
|
|
12 |
# (1) Its Recipients shall ensure that this Notice is
|
|
|
13 |
# reproduced upon any copies or amended versions of it;
|
|
|
14 |
#
|
|
|
15 |
# (2) Any amended version of it shall be clearly marked to
|
|
|
16 |
# show both the nature of and the organisation responsible
|
|
|
17 |
# for the relevant amendment or amendments;
|
|
|
18 |
#
|
|
|
19 |
# (3) Its onward transfer from a recipient to another
|
|
|
20 |
# party shall be deemed to be that party's acceptance of
|
|
|
21 |
# these conditions;
|
|
|
22 |
#
|
|
|
23 |
# (4) DERA gives no warranty or assurance as to its
|
|
|
24 |
# quality or suitability for any purpose and DERA accepts
|
|
|
25 |
# no liability whatsoever in relation to any use to which
|
|
|
26 |
# it may be put.
|
|
|
27 |
#
|
|
|
28 |
# CAE, Networking Services, Issue 4
|
|
|
29 |
|
|
|
30 |
+USE "unix95", "sys/socket.h" ;
|
|
|
31 |
+IMPLEMENT "unix95", "sys/socket.h", "sa_family_t" ;
|
|
|
32 |
|
|
|
33 |
+SUBSET "in_t" := {
|
|
|
34 |
+TYPE ( unsigned ) in_port_t ; # 16 bits
|
|
|
35 |
+TYPE ( unsigned ) in_addr_t ; # 32 bits
|
|
|
36 |
} ;
|
|
|
37 |
|
|
|
38 |
+FIELD struct in_addr {
|
|
|
39 |
in_addr_t s_addr ;
|
|
|
40 |
} ;
|
|
|
41 |
|
|
|
42 |
+FIELD struct sockaddr_in {
|
|
|
43 |
sa_family_t sin_family ;
|
|
|
44 |
in_port_t sin_port ;
|
|
|
45 |
struct in_addr sin_addr ;
|
|
|
46 |
unsigned char sin_zero [ 8 ] ;
|
|
|
47 |
} ;
|
|
|
48 |
|
|
|
49 |
# level of getsockopt and setsockopt
|
|
|
50 |
+CONST int IPPROTO_IP, IPPROTO_ICMP, IPPROTO_TCP, IPPROTO_UDP ;
|
|
|
51 |
|
|
|
52 |
# destination addresses
|
|
|
53 |
+EXP const struct sockaddr * INADDR_ANY ;
|
|
|
54 |
+EXP const struct sockaddr * INADDR_BROADCAST ;
|