OpenVPN 3 Core Library
Loading...
Searching...
No Matches
net-route.h File Reference
#include <sys/appleapiopts.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/socket.h>
Include dependency graph for net-route.h:

Go to the source code of this file.

Classes

struct  rt_metrics
 
struct  rtstat
 
struct  rt_msghdr
 
struct  rt_msghdr2
 
struct  rt_addrinfo
 

Macros

#define RTM_RTTUNIT   1000000 /* units for rtt, rttvar, as units per sec */
 
#define RTF_UP   0x1 /* route usable */
 
#define RTF_GATEWAY   0x2 /* destination is a gateway */
 
#define RTF_HOST   0x4 /* host entry (net otherwise) */
 
#define RTF_REJECT   0x8 /* host or net unreachable */
 
#define RTF_DYNAMIC   0x10 /* created dynamically (by redirect) */
 
#define RTF_MODIFIED   0x20 /* modified dynamically (by redirect) */
 
#define RTF_DONE   0x40 /* message confirmed */
 
#define RTF_DELCLONE   0x80 /* delete cloned route */
 
#define RTF_CLONING   0x100 /* generate new routes on use */
 
#define RTF_XRESOLVE   0x200 /* external daemon resolves name */
 
#define RTF_LLINFO   0x400 /* generated by link layer (e.g. ARP) */
 
#define RTF_STATIC   0x800 /* manually added */
 
#define RTF_BLACKHOLE   0x1000 /* just discard pkts (during updates) */
 
#define RTF_NOIFREF   0x2000 /* not eligible for RTF_IFREF */
 
#define RTF_PROTO2   0x4000 /* protocol specific routing flag */
 
#define RTF_PROTO1   0x8000 /* protocol specific routing flag */
 
#define RTF_PRCLONING   0x10000 /* protocol requires cloning */
 
#define RTF_WASCLONED   0x20000 /* route generated through cloning */
 
#define RTF_PROTO3   0x40000 /* protocol specific routing flag */
 
#define RTF_PINNED   0x100000 /* future use */
 
#define RTF_LOCAL   0x200000 /* route represents a local address */
 
#define RTF_BROADCAST   0x400000 /* route represents a bcast address */
 
#define RTF_MULTICAST   0x800000 /* route represents a mcast address */
 
#define RTF_IFSCOPE   0x1000000 /* has valid interface scope */
 
#define RTF_CONDEMNED   0x2000000 /* defunct; no longer modifiable */
 
#define RTF_IFREF   0x4000000 /* route holds a ref to interface */
 
#define RTF_PROXY   0x8000000 /* proxying, no interface scope */
 
#define RTF_ROUTER   0x10000000 /* host is a router */
 
#define RTF_BITS
 
#define RTM_VERSION   5 /* Up the ante and ignore older versions */
 
#define RTM_ADD   0x1 /* Add Route */
 
#define RTM_DELETE   0x2 /* Delete Route */
 
#define RTM_CHANGE   0x3 /* Change Metrics or flags */
 
#define RTM_GET   0x4 /* Report Metrics */
 
#define RTM_LOSING   0x5 /* Kernel Suspects Partitioning */
 
#define RTM_REDIRECT   0x6 /* Told to use different route */
 
#define RTM_MISS   0x7 /* Lookup failed on this address */
 
#define RTM_LOCK   0x8 /* fix specified metrics */
 
#define RTM_OLDADD   0x9 /* caused by SIOCADDRT */
 
#define RTM_OLDDEL   0xa /* caused by SIOCDELRT */
 
#define RTM_RESOLVE   0xb /* req to resolve dst to LL addr */
 
#define RTM_NEWADDR   0xc /* address being added to iface */
 
#define RTM_DELADDR   0xd /* address being removed from iface */
 
#define RTM_IFINFO   0xe /* iface going up/down etc. */
 
#define RTM_NEWMADDR   0xf /* mcast group membership being added to if */
 
#define RTM_DELMADDR   0x10 /* mcast group membership being deleted */
 
#define RTM_IFINFO2   0x12 /* */
 
#define RTM_NEWMADDR2   0x13 /* */
 
#define RTM_GET2   0x14 /* */
 
#define RTV_MTU   0x1 /* init or lock _mtu */
 
#define RTV_HOPCOUNT   0x2 /* init or lock _hopcount */
 
#define RTV_EXPIRE   0x4 /* init or lock _expire */
 
#define RTV_RPIPE   0x8 /* init or lock _recvpipe */
 
#define RTV_SPIPE   0x10 /* init or lock _sendpipe */
 
#define RTV_SSTHRESH   0x20 /* init or lock _ssthresh */
 
#define RTV_RTT   0x40 /* init or lock _rtt */
 
#define RTV_RTTVAR   0x80 /* init or lock _rttvar */
 
#define RTA_DST   0x1 /* destination sockaddr present */
 
#define RTA_GATEWAY   0x2 /* gateway sockaddr present */
 
#define RTA_NETMASK   0x4 /* netmask sockaddr present */
 
#define RTA_GENMASK   0x8 /* cloning mask sockaddr present */
 
#define RTA_IFP   0x10 /* interface name sockaddr present */
 
#define RTA_IFA   0x20 /* interface addr sockaddr present */
 
#define RTA_AUTHOR   0x40 /* sockaddr for author of redirect */
 
#define RTA_BRD   0x80 /* for NEWADDR, broadcast or p-p dest addr */
 
#define RTAX_DST   0 /* destination sockaddr present */
 
#define RTAX_GATEWAY   1 /* gateway sockaddr present */
 
#define RTAX_NETMASK   2 /* netmask sockaddr present */
 
#define RTAX_GENMASK   3 /* cloning mask sockaddr present */
 
#define RTAX_IFP   4 /* interface name sockaddr present */
 
#define RTAX_IFA   5 /* interface addr sockaddr present */
 
#define RTAX_AUTHOR   6 /* sockaddr for author of redirect */
 
#define RTAX_BRD   7 /* for NEWADDR, broadcast or p-p dest addr */
 
#define RTAX_MAX   8 /* size of array to allocate */
 

Macro Definition Documentation

◆ RTA_AUTHOR

#define RTA_AUTHOR   0x40 /* sockaddr for author of redirect */

Definition at line 230 of file net-route.h.

◆ RTA_BRD

#define RTA_BRD   0x80 /* for NEWADDR, broadcast or p-p dest addr */

Definition at line 231 of file net-route.h.

◆ RTA_DST

#define RTA_DST   0x1 /* destination sockaddr present */

Definition at line 224 of file net-route.h.

◆ RTA_GATEWAY

#define RTA_GATEWAY   0x2 /* gateway sockaddr present */

Definition at line 225 of file net-route.h.

◆ RTA_GENMASK

#define RTA_GENMASK   0x8 /* cloning mask sockaddr present */

Definition at line 227 of file net-route.h.

◆ RTA_IFA

#define RTA_IFA   0x20 /* interface addr sockaddr present */

Definition at line 229 of file net-route.h.

◆ RTA_IFP

#define RTA_IFP   0x10 /* interface name sockaddr present */

Definition at line 228 of file net-route.h.

◆ RTA_NETMASK

#define RTA_NETMASK   0x4 /* netmask sockaddr present */

Definition at line 226 of file net-route.h.

◆ RTAX_AUTHOR

#define RTAX_AUTHOR   6 /* sockaddr for author of redirect */

Definition at line 242 of file net-route.h.

◆ RTAX_BRD

#define RTAX_BRD   7 /* for NEWADDR, broadcast or p-p dest addr */

Definition at line 243 of file net-route.h.

◆ RTAX_DST

#define RTAX_DST   0 /* destination sockaddr present */

Definition at line 236 of file net-route.h.

◆ RTAX_GATEWAY

#define RTAX_GATEWAY   1 /* gateway sockaddr present */

Definition at line 237 of file net-route.h.

◆ RTAX_GENMASK

#define RTAX_GENMASK   3 /* cloning mask sockaddr present */

Definition at line 239 of file net-route.h.

◆ RTAX_IFA

#define RTAX_IFA   5 /* interface addr sockaddr present */

Definition at line 241 of file net-route.h.

◆ RTAX_IFP

#define RTAX_IFP   4 /* interface name sockaddr present */

Definition at line 240 of file net-route.h.

◆ RTAX_MAX

#define RTAX_MAX   8 /* size of array to allocate */

Definition at line 244 of file net-route.h.

◆ RTAX_NETMASK

#define RTAX_NETMASK   2 /* netmask sockaddr present */

Definition at line 238 of file net-route.h.

◆ RTF_BITS

#define RTF_BITS
Value:
"\020\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE" \
"\10DELCLONE\11CLONING\12XRESOLVE\13LLINFO\14STATIC\15BLACKHOLE" \
"\16NOIFREF\17PROTO2\20PROTO1\21PRCLONING\22WASCLONED\23PROTO3" \
"\25PINNED\26LOCAL\27BROADCAST\30MULTICAST\31IFSCOPE\32CONDEMNED" \
"\33IFREF\34PROXY\35ROUTER"

Definition at line 129 of file net-route.h.

◆ RTF_BLACKHOLE

#define RTF_BLACKHOLE   0x1000 /* just discard pkts (during updates) */

Definition at line 109 of file net-route.h.

◆ RTF_BROADCAST

#define RTF_BROADCAST   0x400000 /* route represents a bcast address */

Definition at line 120 of file net-route.h.

◆ RTF_CLONING

#define RTF_CLONING   0x100 /* generate new routes on use */

Definition at line 105 of file net-route.h.

◆ RTF_CONDEMNED

#define RTF_CONDEMNED   0x2000000 /* defunct; no longer modifiable */

Definition at line 123 of file net-route.h.

◆ RTF_DELCLONE

#define RTF_DELCLONE   0x80 /* delete cloned route */

Definition at line 104 of file net-route.h.

◆ RTF_DONE

#define RTF_DONE   0x40 /* message confirmed */

Definition at line 103 of file net-route.h.

◆ RTF_DYNAMIC

#define RTF_DYNAMIC   0x10 /* created dynamically (by redirect) */

Definition at line 101 of file net-route.h.

◆ RTF_GATEWAY

#define RTF_GATEWAY   0x2 /* destination is a gateway */

Definition at line 98 of file net-route.h.

◆ RTF_HOST

#define RTF_HOST   0x4 /* host entry (net otherwise) */

Definition at line 99 of file net-route.h.

◆ RTF_IFREF

#define RTF_IFREF   0x4000000 /* route holds a ref to interface */

Definition at line 124 of file net-route.h.

◆ RTF_IFSCOPE

#define RTF_IFSCOPE   0x1000000 /* has valid interface scope */

Definition at line 122 of file net-route.h.

◆ RTF_LLINFO

#define RTF_LLINFO   0x400 /* generated by link layer (e.g. ARP) */

Definition at line 107 of file net-route.h.

◆ RTF_LOCAL

#define RTF_LOCAL   0x200000 /* route represents a local address */

Definition at line 119 of file net-route.h.

◆ RTF_MODIFIED

#define RTF_MODIFIED   0x20 /* modified dynamically (by redirect) */

Definition at line 102 of file net-route.h.

◆ RTF_MULTICAST

#define RTF_MULTICAST   0x800000 /* route represents a mcast address */

Definition at line 121 of file net-route.h.

◆ RTF_NOIFREF

#define RTF_NOIFREF   0x2000 /* not eligible for RTF_IFREF */

Definition at line 110 of file net-route.h.

◆ RTF_PINNED

#define RTF_PINNED   0x100000 /* future use */

Definition at line 118 of file net-route.h.

◆ RTF_PRCLONING

#define RTF_PRCLONING   0x10000 /* protocol requires cloning */

Definition at line 114 of file net-route.h.

◆ RTF_PROTO1

#define RTF_PROTO1   0x8000 /* protocol specific routing flag */

Definition at line 112 of file net-route.h.

◆ RTF_PROTO2

#define RTF_PROTO2   0x4000 /* protocol specific routing flag */

Definition at line 111 of file net-route.h.

◆ RTF_PROTO3

#define RTF_PROTO3   0x40000 /* protocol specific routing flag */

Definition at line 116 of file net-route.h.

◆ RTF_PROXY

#define RTF_PROXY   0x8000000 /* proxying, no interface scope */

Definition at line 125 of file net-route.h.

◆ RTF_REJECT

#define RTF_REJECT   0x8 /* host or net unreachable */

Definition at line 100 of file net-route.h.

◆ RTF_ROUTER

#define RTF_ROUTER   0x10000000 /* host is a router */

Definition at line 126 of file net-route.h.

◆ RTF_STATIC

#define RTF_STATIC   0x800 /* manually added */

Definition at line 108 of file net-route.h.

◆ RTF_UP

#define RTF_UP   0x1 /* route usable */

Definition at line 97 of file net-route.h.

◆ RTF_WASCLONED

#define RTF_WASCLONED   0x20000 /* route generated through cloning */

Definition at line 115 of file net-route.h.

◆ RTF_XRESOLVE

#define RTF_XRESOLVE   0x200 /* external daemon resolves name */

Definition at line 106 of file net-route.h.

◆ RTM_ADD

#define RTM_ADD   0x1 /* Add Route */

Definition at line 189 of file net-route.h.

◆ RTM_CHANGE

#define RTM_CHANGE   0x3 /* Change Metrics or flags */

Definition at line 191 of file net-route.h.

◆ RTM_DELADDR

#define RTM_DELADDR   0xd /* address being removed from iface */

Definition at line 201 of file net-route.h.

◆ RTM_DELETE

#define RTM_DELETE   0x2 /* Delete Route */

Definition at line 190 of file net-route.h.

◆ RTM_DELMADDR

#define RTM_DELMADDR   0x10 /* mcast group membership being deleted */

Definition at line 204 of file net-route.h.

◆ RTM_GET

#define RTM_GET   0x4 /* Report Metrics */

Definition at line 192 of file net-route.h.

◆ RTM_GET2

#define RTM_GET2   0x14 /* */

Definition at line 207 of file net-route.h.

◆ RTM_IFINFO

#define RTM_IFINFO   0xe /* iface going up/down etc. */

Definition at line 202 of file net-route.h.

◆ RTM_IFINFO2

#define RTM_IFINFO2   0x12 /* */

Definition at line 205 of file net-route.h.

◆ RTM_LOCK

#define RTM_LOCK   0x8 /* fix specified metrics */

Definition at line 196 of file net-route.h.

◆ RTM_LOSING

#define RTM_LOSING   0x5 /* Kernel Suspects Partitioning */

Definition at line 193 of file net-route.h.

◆ RTM_MISS

#define RTM_MISS   0x7 /* Lookup failed on this address */

Definition at line 195 of file net-route.h.

◆ RTM_NEWADDR

#define RTM_NEWADDR   0xc /* address being added to iface */

Definition at line 200 of file net-route.h.

◆ RTM_NEWMADDR

#define RTM_NEWMADDR   0xf /* mcast group membership being added to if */

Definition at line 203 of file net-route.h.

◆ RTM_NEWMADDR2

#define RTM_NEWMADDR2   0x13 /* */

Definition at line 206 of file net-route.h.

◆ RTM_OLDADD

#define RTM_OLDADD   0x9 /* caused by SIOCADDRT */

Definition at line 197 of file net-route.h.

◆ RTM_OLDDEL

#define RTM_OLDDEL   0xa /* caused by SIOCDELRT */

Definition at line 198 of file net-route.h.

◆ RTM_REDIRECT

#define RTM_REDIRECT   0x6 /* Told to use different route */

Definition at line 194 of file net-route.h.

◆ RTM_RESOLVE

#define RTM_RESOLVE   0xb /* req to resolve dst to LL addr */

Definition at line 199 of file net-route.h.

◆ RTM_RTTUNIT

#define RTM_RTTUNIT   1000000 /* units for rtt, rttvar, as units per sec */

Definition at line 93 of file net-route.h.

◆ RTM_VERSION

#define RTM_VERSION   5 /* Up the ante and ignore older versions */

Definition at line 184 of file net-route.h.

◆ RTV_EXPIRE

#define RTV_EXPIRE   0x4 /* init or lock _expire */

Definition at line 214 of file net-route.h.

◆ RTV_HOPCOUNT

#define RTV_HOPCOUNT   0x2 /* init or lock _hopcount */

Definition at line 213 of file net-route.h.

◆ RTV_MTU

#define RTV_MTU   0x1 /* init or lock _mtu */

Definition at line 212 of file net-route.h.

◆ RTV_RPIPE

#define RTV_RPIPE   0x8 /* init or lock _recvpipe */

Definition at line 215 of file net-route.h.

◆ RTV_RTT

#define RTV_RTT   0x40 /* init or lock _rtt */

Definition at line 218 of file net-route.h.

◆ RTV_RTTVAR

#define RTV_RTTVAR   0x80 /* init or lock _rttvar */

Definition at line 219 of file net-route.h.

◆ RTV_SPIPE

#define RTV_SPIPE   0x10 /* init or lock _sendpipe */

Definition at line 216 of file net-route.h.

◆ RTV_SSTHRESH

#define RTV_SSTHRESH   0x20 /* init or lock _ssthresh */

Definition at line 217 of file net-route.h.