Changeset View
Changeset View
Standalone View
Standalone View
sys/netlink/route/neigh.h
- This file was added.
/* | |||||
* Neighbors-related (RTM_<NEW|DEL|GET>NEIGH) message header and attributes. | |||||
*/ | |||||
#ifndef _NETLINK_ROUTE_NEIGH_H_ | |||||
#define _NETLINK_ROUTE_NEIGH_H_ | |||||
/* Base header for all of the relevant messages */ | |||||
struct ndmsg { | |||||
uint8_t ndm_family; | |||||
uint8_t ndm_pad1; | |||||
uint16_t ndm_pad2; | |||||
int32_t ndm_ifindex; | |||||
uint16_t ndm_state; | |||||
uint8_t ndm_flags; | |||||
uint8_t ndm_type; | |||||
}; | |||||
/* Attributes */ | |||||
enum { | |||||
NDA_UNSPEC, | |||||
NDA_DST, /* neigh l3 address */ | |||||
NDA_LLADDR, /* neigh link-level address */ | |||||
NDA_CACHEINFO, /* lifetime */ | |||||
NDA_PROBES, /* XXX */ | |||||
NDA_VLAN, /* upper 802.1Q tag */ | |||||
NDA_PORT, /* not used */ | |||||
NDA_VNI, /* not used */ | |||||
NDA_IFINDEX, /* interface index */ | |||||
NDA_MASTER, /* not used */ | |||||
NDA_LINK_NETNSID, /* not used */ | |||||
NDA_SRC_VNI, /* not used */ | |||||
NDA_PROTOCOL, /* XXX */ | |||||
NDA_NH_ID, /* not used */ | |||||
NDA_FDB_EXT_ATTRS, /* not used */ | |||||
NDA_FLAGS_EXT, /* ndm_flags */ | |||||
NDA_NDM_STATE_MASK, /* XXX */ | |||||
NDA_NDM_FLAGS_MASK, /* XXX */ | |||||
__NDA_MAX | |||||
}; | |||||
#define NDA_MAX (__NDA_MAX - 1) | |||||
/* ndm_flags / NDA_FLAGS_EXT */ | |||||
#define NTF_USE 0x0001 /* XXX */ | |||||
#define NTF_SELF 0x0002 /* local station */ | |||||
#define NTF_MASTER 0x0004 /* XXX */ | |||||
#define NTF_PROXY 0x0008 /* proxy entry */ | |||||
#define NTF_EXT_LEARNED 0x0010 /* not used */ | |||||
#define NTF_OFFLOADED 0x0020 /* not used */ | |||||
#define NTF_STICKY 0x0040 /* permament entry */ | |||||
#define NTF_ROUTER 0x0080 /* dst indicated itself as a router */ | |||||
/* start of NDA_FLAGS_EXT */ | |||||
#define NTF_EXT_MANAGED 0x0100 /* not used */ | |||||
/* ndm_state */ | |||||
#define NUD_INCOMPLETE 0x01 /* No lladdr, address resolution in progress */ | |||||
#define NUD_REACHABLE 0x02 /* reachable & recently resolved */ | |||||
#define NUD_STALE 0x04 /* has lladdr but it's stale */ | |||||
#define NUD_DELAY 0x08 /* has lladdr, is stale, probes delayed */ | |||||
#define NUD_PROBE 0x10 /* has lladdr, is stale, probes sent */ | |||||
#define NUD_FAILED 0x20 /* unused */ | |||||
/* Dummy states */ | |||||
#define NUD_NOARP 0x40 /* not used */ | |||||
#define NUD_PERMANENT 0x80 /* not flushed */ | |||||
#define NUD_NONE 0x00 | |||||
/* NDA_CACHEINFO */ | |||||
struct nda_cacheinfo { | |||||
uint32_t ndm_confirmed; /* seconds since ARP/ND was received from neigh */ | |||||
uint32_t ndm_used; /* seconds since last used (not provided) */ | |||||
uint32_t ndm_updated; /* seconds since state was updated last */ | |||||
uint32_t ndm_refcnt; /* number of references held */ | |||||
}; | |||||
#endif |