Project

General

Profile

Statistics
| Revision:

root / lab4 / .minix-src / include / net / gen / in.h @ 13

History | View | Annotate | Download (869 Bytes)

1 13 up20180614
/*
2
server/ip/gen/in.h
3
*/
4
5
#ifndef __SERVER__IP__GEN__IN_H__
6
#define __SERVER__IP__GEN__IN_H__
7
8
#include <net/gen/in.h>
9
#include <sys/types.h>
10
11
#define IP_MIN_HDR_SIZE                20
12
#define IP_MAX_HDR_SIZE                60                /* 15 * 4 */
13
#define IP_VERSION                4
14
#define IP_DEF_TTL                64
15
#define IP_MAX_TTL                255
16
#define IP_DEF_MTU                576
17
#define IP_MIN_MTU                (IP_MAX_HDR_SIZE+8)
18
#define IP_MAX_PACKSIZE                40000
19
        /* Note: this restriction is not part of the IP-protocol but
20
           introduced by this implementation. */
21
22
#define IPPROTO_ICMP                1
23
#define IPPROTO_TCP                6
24
#define IPPROTO_UDP                17
25
26
#define IP_MC_ALL_SYSTEMS        0xE0000001        /* 224.0.0.1 */
27
28
typedef u32_t ipaddr_t;
29
typedef u8_t ipproto_t;
30
typedef struct ip_hdropt
31
{
32
        u8_t iho_opt_siz;
33
        u8_t iho_data[IP_MAX_HDR_SIZE-IP_MIN_HDR_SIZE];
34
} ip_hdropt_t;
35
36
#endif /* __SERVER__IP__GEN__IN_H__ */
37
38
/*
39
 * $PchId: in.h,v 1.6 2002/06/10 07:11:15 philip Exp $
40
 */