summaryrefslogtreecommitdiff
path: root/packages/libc/src/nrouteh.inc
blob: 83b7e4dc2ee01d919fd4c4a3917205a7f9a102c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

type

   Prtentry = ^rtentry;
   rtentry = record
        rt_pad1 : dword;
        rt_dst : sockaddr;
        rt_gateway : sockaddr;
        rt_genmask : sockaddr;
        rt_flags : word;
        rt_pad2 : smallint;
        rt_pad3 : dword;
        rt_tos : byte;
        rt_class : byte;
        rt_pad4 : smallint;
        rt_metric : smallint;
        rt_dev : Pchar;
        rt_mtu : dword;
        rt_window : dword;
        rt_irtt : word;
     end;


type
   Pin6_rtmsg = ^in6_rtmsg;
   in6_rtmsg = record
        rtmsg_dst : in6_addr;
        rtmsg_src : in6_addr;
        rtmsg_gateway : in6_addr;
        rtmsg_type : u_int32_t;
        rtmsg_dst_len : u_int16_t;
        rtmsg_src_len : u_int16_t;
        rtmsg_metric : u_int32_t;
        rtmsg_info : dword;
        rtmsg_flags : u_int32_t;
        rtmsg_ifindex : longint;
     end;


const
   RTF_UP = $0001;
   RTF_GATEWAY = $0002;
   RTF_HOST = $0004;
   RTF_REINSTATE = $0008;
   RTF_DYNAMIC = $0010;
   RTF_MODIFIED = $0020;
   RTF_MTU = $0040;
   RTF_MSS = RTF_MTU;
   RTF_WINDOW = $0080;
   RTF_IRTT = $0100;
   RTF_REJECT = $0200;
   RTF_STATIC = $0400;
   RTF_XRESOLVE = $0800;
   RTF_NOFORWARD = $1000;
   RTF_THROW = $2000;
   RTF_NOPMTUDISC = $4000;
   RTF_DEFAULT = $00010000;
   RTF_ALLONLINK = $00020000;
   RTF_ADDRCONF = $00040000;
   RTF_LINKRT = $00100000;
   RTF_NONEXTHOP = $00200000;
   RTF_CACHE = $01000000;
   RTF_FLOW = $02000000;
   RTF_POLICY = $04000000;
   RTCF_VALVE = $00200000;
   RTCF_MASQ = $00400000;
   RTCF_NAT = $00800000;
   RTCF_DOREDIRECT = $01000000;
   RTCF_LOG = $02000000;
   RTCF_DIRECTSRC = $04000000;
   RTF_LOCAL = $80000000;
   RTF_INTERFACE = $40000000;
   RTF_MULTICAST = $20000000;
   RTF_BROADCAST = $10000000;
   RTF_NAT = $08000000;
   RTF_ADDRCLASSMASK = $F8000000;

Function RT_ADDRCLASS(flags: u_int32_t): u_int32_t;
Function RT_TOS(tos: Integer): Integer;
Function RT_LOCALADDR(flags: u_int32_t): Boolean;


const
   RT_CLASS_UNSPEC = 0;
   RT_CLASS_DEFAULT = 253;
   RT_CLASS_MAIN = 254;
   RT_CLASS_LOCAL = 255;
   RT_CLASS_MAX = 255;

//   RTMSG_ACK = NLMSG_ACK;
//   RTMSG_OVERRUN = NLMSG_OVERRUN;
   RTMSG_NEWDEVICE = $11;
   RTMSG_DELDEVICE = $12;
   RTMSG_NEWROUTE = $21;
   RTMSG_DELROUTE = $22;
   RTMSG_NEWRULE = $31;
   RTMSG_DELRULE = $32;
   RTMSG_CONTROL = $40;
   RTMSG_AR_FAILED = $51;



{ ---------------------------------------------------------------------
    Borland compatibility types
  ---------------------------------------------------------------------}

// Type