Perl 5.001
[p5sagit/p5-mst-13.2.git] / vms / sockadapt.h
1 /*  sockadapt.h
2  *
3  *  Authors: Charles Bailey  bailey@genetics.upenn.edu
4  *           David Denholm  denholm@conmat.phys.soton.ac.uk
5  *  Last Revised: 24-Feb-1995
6  *
7  *  This file should include any other header files and procide any
8  *  declarations, typedefs, and prototypes needed by perl for TCP/IP
9  *  operations.
10  *
11  *  This version is set up for perl5 with socketshr 0.9D TCP/IP support.
12  */
13
14 #include <socketshr.h>
15
16 /* we may not have netdb.h etc, so lets just do this here  - div */
17 /* no harm doing this for all .c files - needed only by pp_sys.c */
18
19 struct  hostent {
20     char        *h_name;        /* official name of host */
21     char        **h_aliases;    /* alias list */
22     int h_addrtype;     /* host address type */
23     int h_length;       /* length of address */
24     char        **h_addr_list;  /* address */
25 };
26 #ifdef h_addr
27 #   undef h_addr
28 #endif
29 #define h_addr h_addr_list[0]
30
31 struct  protoent {
32     char        *p_name;        /* official protocol name */
33     char        **p_aliases;    /* alias list */
34     int p_proto;        /* protocol # */
35 };
36
37 struct  servent {
38     char        *s_name;        /* official service name */
39     char        **s_aliases;    /* alias list */
40     int s_port;         /* port # */
41     char        *s_proto;       /* protocol to use */
42 };
43
44 struct  in_addr {
45     unsigned long s_addr;
46 };
47
48 struct  sockaddr {
49     unsigned short      sa_family;              /* address family */
50     char        sa_data[14];            /* up to 14 bytes of direct address */
51 };
52
53 struct timeval {
54     long tv_sec;
55     long tv_usec;
56 };
57
58 struct netent {
59         char *n_name;
60         char **n_aliases;
61         int n_addrtype;
62         long n_net;
63 };