xref: /freebsd/sys/netinet/ip_carp_nl.h (revision 37115154672f74744e8f5992a3f0953d61cb79bc)
140e04359SKristof Provost #ifndef _IP_CARP_NL_H
240e04359SKristof Provost #define _IP_CARP_NL_H
340e04359SKristof Provost 
440e04359SKristof Provost #include <net/if.h>
540e04359SKristof Provost 
640e04359SKristof Provost #include <netinet/ip_carp.h>
740e04359SKristof Provost #include <netlink/netlink_generic.h>
840e04359SKristof Provost 
940e04359SKristof Provost /*
1040e04359SKristof Provost  * Netlink interface to carp(4).
1140e04359SKristof Provost  */
1240e04359SKristof Provost 
1340e04359SKristof Provost #define CARP_NL_FAMILY_NAME	"carp"
1440e04359SKristof Provost 
1540e04359SKristof Provost /* commands */
1640e04359SKristof Provost enum {
1740e04359SKristof Provost 	CARP_NL_CMD_UNSPEC	= 0,
1840e04359SKristof Provost 	CARP_NL_CMD_GET		= 1,
1940e04359SKristof Provost 	CARP_NL_CMD_SET		= 2,
2040e04359SKristof Provost 	__CARP_NL_CMD_MAX,
2140e04359SKristof Provost };
2240e04359SKristof Provost #define	CARP_NL_CMD_MAX	(__CARP_NL_CMD_MAX - 1)
2340e04359SKristof Provost 
2440e04359SKristof Provost enum carp_nl_type_t {
2540e04359SKristof Provost 	CARP_NL_UNSPEC,
2640e04359SKristof Provost 	CARP_NL_VHID		= 1,	/* u32 */
2740e04359SKristof Provost 	CARP_NL_STATE		= 2,	/* u32 */
2840e04359SKristof Provost 	CARP_NL_ADVBASE		= 3,	/* s32 */
2940e04359SKristof Provost 	CARP_NL_ADVSKEW		= 4,	/* s32 */
3040e04359SKristof Provost 	CARP_NL_KEY		= 5,	/* byte array */
3140e04359SKristof Provost 	CARP_NL_IFINDEX		= 6,	/* u32 */
3213781800SKristof Provost 	CARP_NL_ADDR		= 7,	/* in_addr_t */
3313781800SKristof Provost 	CARP_NL_ADDR6		= 8,	/* in6_addr_t */
3428921c4fSKristof Provost 	CARP_NL_IFNAME		= 9,	/* string */
35*37115154SKristof Provost 	CARP_NL_VERSION		= 10,	/* u8 */
36*37115154SKristof Provost 	CARP_NL_VRRP_PRIORITY	= 11,	/* u8 */
37*37115154SKristof Provost 	CARP_NL_VRRP_ADV_INTER	= 12,	/* u16, 12-bit field in centiseconds*/
3840e04359SKristof Provost };
3940e04359SKristof Provost 
4040e04359SKristof Provost #endif
41