Add route route attribute constants
netlink/constant.scm
76 | 76 | IFA_ANYCAST IFA_CACHEINFO IFA_MULTICAST IFA_FLAGS | |
77 | 77 | IFA_RT_PRIORITY IFA_TARGET_NETNSID) | |
78 | 78 | ||
79 | + | (define-enum int->route-attr-kind | |
80 | + | RTA_UNSPEC RTA_DST RTA_SRC RTA_IIF RTA_OIF RTA_GATEWAY | |
81 | + | RTA_PRIORITY RTA_PREFSRC RTA_METRICS RTA_MULTIPATH | |
82 | + | RTA_PROTOINFO RTA_FLOW RTA_CACHEINFO RTA_SESSION RTA_MP_ALGO | |
83 | + | RTA_TABLE RTA_MARK RTA_MFC_STATS RTA_VIA RTA_NEWDST RTA_PREF | |
84 | + | RTA_ENCAP_TYPE RTA_ENCAP RTA_EXPIRES RTA_PAD RTA_UID | |
85 | + | RTA_TTL_PROPAGATE RTA_IP_PROTO RTA_SPORT RTA_DPORT RTA_NH_ID) | |
86 | + | ||
79 | 87 | (define-public AF_NETLINK 16) | |
80 | 88 | (define-public AF_PACKET 17) | |
81 | 89 | ||
… | |||
208 | 216 | IF_OPER_UNKNOWN IF_OPER_NOTPRESENT IF_OPER_DOWN | |
209 | 217 | IF_OPER_LOWERLAYERDOWN IF_OPER_TESTING IF_OPER_DORMANT | |
210 | 218 | IF_OPER_UP) | |
219 | + | ||
220 | + | ;; rtm_type | |
221 | + | (define-enum int->rtm-type | |
222 | + | RTN_UNSPEC RTN_UNICAST RTN_LOCAL RTN_BROADCAST RTN_ANYCAST | |
223 | + | RTN_MULTICAST RTN_BLACKHOLE RTN_UNREACHABLE RTN_PROHIBIT | |
224 | + | RTN_THROW RTN_NAT RTN_XRESOLVE) | |
225 | + | ||
226 | + | ;; rtm_protocol | |
227 | + | (define-enum int->rtm-protocol | |
228 | + | RTPROT_UNSPEC RTPROT_REDIRECT RTPROT_KERNEL RTPROT_BOOT RTPROT_STATIC | |
229 | + | ;; not interpreted by the kernel, but returned anyway. | |
230 | + | (RTPROT_GATED 8) | |
231 | + | RTPROT_RA RTPROT_MRT RTPROT_ZEBRA RTPROT_BIRD RTPROT_DNROUTED | |
232 | + | RTPROT_XORP RTPROT_NTK RTPROT_DHCP RTPROT_MROUTED | |
233 | + | (RTPROT_BABEL 42) | |
234 | + | (RTPROT_BGP 186) | |
235 | + | RTPROT_ISIS RTPROT_OSPF RTPROT_RIP | |
236 | + | (RTPROT_EIGRP 192)) | |
237 | + | ||
238 | + | ;; rtm_scope | |
239 | + | (define-enum int->rtm-scope | |
240 | + | RT_SCOPE_UNIVERSE | |
241 | + | (RT_SCOPE_SITE 200) | |
242 | + | (RT_SCOPE_LINK 253) | |
243 | + | (RT_SCOPE_HOST 254) | |
244 | + | (RT_SCOPE_NOWHERE 255)) | |
245 | + | ||
246 | + | ;; rtm_flags | |
247 | + | (define-enum int->rtm-flag | |
248 | + | (RTM_F_NOTIFY #x100) | |
249 | + | (RTM_F_CLONED #x200) | |
250 | + | (RTM_F_EQUALIZE #x400) | |
251 | + | (RTM_F_PREFIX #x800) | |
252 | + | (RTM_F_LOOKUP_TABLE #x1000) | |
253 | + | (RTM_F_FIB_MATCH #x2000) | |
254 | + | (RTM_F_OFFLOAD #x4000) | |
255 | + | (RTM_F_TRAP #x8000)) | |
256 | + | ||
257 | + | ||
258 | + | ;; rtm_table | |
259 | + | (define-enum int->rtm-table | |
260 | + | RT_TABLE_UNSPEC | |
261 | + | (RT_TABLE_COMPAT 252) | |
262 | + | (RT_TABLE_DEFAULT 253) | |
263 | + | (RT_TABLE_MAIN 254) | |
264 | + | (RT_TABLE_LOCAL 255)) |