1 2type 3 4 Prtentry = ^rtentry; 5 rtentry = record 6 rt_pad1 : dword; 7 rt_dst : sockaddr; 8 rt_gateway : sockaddr; 9 rt_genmask : sockaddr; 10 rt_flags : word; 11 rt_pad2 : smallint; 12 rt_pad3 : dword; 13 rt_tos : byte; 14 rt_class : byte; 15 rt_pad4 : smallint; 16 rt_metric : smallint; 17 rt_dev : Pchar; 18 rt_mtu : dword; 19 rt_window : dword; 20 rt_irtt : word; 21 end; 22 23 24type 25 Pin6_rtmsg = ^in6_rtmsg; 26 in6_rtmsg = record 27 rtmsg_dst : in6_addr; 28 rtmsg_src : in6_addr; 29 rtmsg_gateway : in6_addr; 30 rtmsg_type : u_int32_t; 31 rtmsg_dst_len : u_int16_t; 32 rtmsg_src_len : u_int16_t; 33 rtmsg_metric : u_int32_t; 34 rtmsg_info : dword; 35 rtmsg_flags : u_int32_t; 36 rtmsg_ifindex : longint; 37 end; 38 39 40const 41 RTF_UP = $0001; 42 RTF_GATEWAY = $0002; 43 RTF_HOST = $0004; 44 RTF_REINSTATE = $0008; 45 RTF_DYNAMIC = $0010; 46 RTF_MODIFIED = $0020; 47 RTF_MTU = $0040; 48 RTF_MSS = RTF_MTU; 49 RTF_WINDOW = $0080; 50 RTF_IRTT = $0100; 51 RTF_REJECT = $0200; 52 RTF_STATIC = $0400; 53 RTF_XRESOLVE = $0800; 54 RTF_NOFORWARD = $1000; 55 RTF_THROW = $2000; 56 RTF_NOPMTUDISC = $4000; 57 RTF_DEFAULT = $00010000; 58 RTF_ALLONLINK = $00020000; 59 RTF_ADDRCONF = $00040000; 60 RTF_LINKRT = $00100000; 61 RTF_NONEXTHOP = $00200000; 62 RTF_CACHE = $01000000; 63 RTF_FLOW = $02000000; 64 RTF_POLICY = $04000000; 65 RTCF_VALVE = $00200000; 66 RTCF_MASQ = $00400000; 67 RTCF_NAT = $00800000; 68 RTCF_DOREDIRECT = $01000000; 69 RTCF_LOG = $02000000; 70 RTCF_DIRECTSRC = $04000000; 71 RTF_LOCAL = $80000000; 72 RTF_INTERFACE = $40000000; 73 RTF_MULTICAST = $20000000; 74 RTF_BROADCAST = $10000000; 75 RTF_NAT = $08000000; 76 RTF_ADDRCLASSMASK = $F8000000; 77 78Function RT_ADDRCLASS(flags: u_int32_t): u_int32_t; 79Function RT_TOS(tos: Integer): Integer; 80Function RT_LOCALADDR(flags: u_int32_t): Boolean; 81 82 83const 84 RT_CLASS_UNSPEC = 0; 85 RT_CLASS_DEFAULT = 253; 86 RT_CLASS_MAIN = 254; 87 RT_CLASS_LOCAL = 255; 88 RT_CLASS_MAX = 255; 89 90// RTMSG_ACK = NLMSG_ACK; 91// RTMSG_OVERRUN = NLMSG_OVERRUN; 92 RTMSG_NEWDEVICE = $11; 93 RTMSG_DELDEVICE = $12; 94 RTMSG_NEWROUTE = $21; 95 RTMSG_DELROUTE = $22; 96 RTMSG_NEWRULE = $31; 97 RTMSG_DELRULE = $32; 98 RTMSG_CONTROL = $40; 99 RTMSG_AR_FAILED = $51; 100 101 102 103{ --------------------------------------------------------------------- 104 Borland compatibility types 105 ---------------------------------------------------------------------} 106 107// Type 108