nrouteh.inc 2.5 KB

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