@@ -3064,6 +3064,12 @@ pub const SO_TS_DEFAULT: ::c_int = SO_TS_REALTIME_MICRO;
30643064pub const SO_TS_CLOCK_MAX : :: c_int = SO_TS_MONOTONIC ;
30653065
30663066/// netlink constants
3067+
3068+ // sys/socket.h
3069+ pub const AF_NETLINK : :: c_int = 38 ;
3070+ pub const PF_NETLINK : :: c_int = AF_NETLINK ;
3071+
3072+ // netlink/netlink.h
30673073pub const SOL_NETLINK : :: c_int = 270 ;
30683074pub const NETLINK_ADD_MEMBERSHIP : :: c_int = 1 ;
30693075pub const NETLINK_DROP_MEMBERSHIP : :: c_int = 2 ;
@@ -3077,10 +3083,34 @@ pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9;
30773083pub const NETLINK_CAP_ACK : :: c_int = 10 ;
30783084pub const NETLINK_EXT_ACK : :: c_int = 11 ;
30793085pub const NETLINK_GET_STRICT_CHK : :: c_int = 12 ;
3080-
3081- pub const AF_NETLINK : :: c_int = 38 ;
3082- pub const PF_NETLINK : :: c_int = AF_NETLINK ;
3083-
3086+ //
3087+ pub const NLM_F_REQUEST : :: c_int = 0x01 ;
3088+ pub const NLM_F_MULTI : :: c_int = 0x02 ;
3089+ pub const NLM_F_ACK : :: c_int = 0x04 ;
3090+ pub const NLM_F_ECHO : :: c_int = 0x08 ;
3091+ pub const NLM_F_DUMP_INTR : :: c_int = 0x10 ;
3092+ pub const NLM_F_DUMP_FILTERED : :: c_int = 0x20 ;
3093+ //
3094+ pub const NLM_F_ROOT : :: c_int = 0x100 ;
3095+ pub const NLM_F_MATCH : :: c_int = 0x200 ;
3096+ pub const NLM_F_ATOMIC : :: c_int = 0x400 ;
3097+ pub const NLM_F_DUMP : :: c_int = NLM_F_ROOT | NLM_F_MATCH ;
3098+ //
3099+ pub const NLM_F_REPLACE : :: c_int = 0x100 ;
3100+ pub const NLM_F_EXCL : :: c_int = 0x200 ;
3101+ pub const NLM_F_CREATE : :: c_int = 0x400 ;
3102+ pub const NLM_F_APPEND : :: c_int = 0x800 ;
3103+ //
3104+ pub const NLM_F_NONREC : :: c_int = 0x100 ;
3105+ //
3106+ pub const NLM_F_CAPPED : :: c_int = 0x100 ;
3107+ pub const NLM_F_ACK_TLVS : :: c_int = 0x200 ;
3108+ //
3109+ pub const NLMSG_NOOP : :: c_int = 0x1 ;
3110+ pub const NLMSG_ERROR : :: c_int = 0x2 ;
3111+ pub const NLMSG_DONE : :: c_int = 0x3 ;
3112+ pub const NLMSG_OVERRUN : :: c_int = 0x4 ;
3113+ //
30843114pub const NETLINK_ROUTE : :: c_int = 0 ;
30853115pub const NETLINK_UNUSED : :: c_int = 1 ;
30863116pub const NETLINK_USERSOCK : :: c_int = 2 ;
@@ -3098,6 +3128,57 @@ pub const NETLINK_IP6_FW: ::c_int = 13;
30983128pub const NETLINK_DNRTMSG : :: c_int = 14 ;
30993129pub const NETLINK_KOBJECT_UEVENT : :: c_int = 15 ;
31003130pub const NETLINK_GENERIC : :: c_int = 16 ;
3131+ //
3132+ const NL_ITEM_ALIGN_SIZE : :: c_int = 4 ; // mem::size_of::<u32>(); FIXME accept new dep?
3133+ pub const NLMSG_ALIGNTO : :: c_int = NL_ITEM_ALIGN_SIZE ;
3134+
3135+ // netlink/netlink_generic.h
3136+ pub const CTRL_CMD_UNSPEC : :: c_int = 0 ;
3137+ pub const CTRL_CMD_NEWFAMILY : :: c_int = 1 ;
3138+ pub const CTRL_CMD_DELFAMILY : :: c_int = 2 ;
3139+ pub const CTRL_CMD_GETFAMILY : :: c_int = 3 ;
3140+ pub const CTRL_CMD_NEWOPS : :: c_int = 4 ;
3141+ pub const CTRL_CMD_DELOPS : :: c_int = 5 ;
3142+ pub const CTRL_CMD_GETOPS : :: c_int = 6 ;
3143+ pub const CTRL_CMD_NEWMCAST_GRP : :: c_int = 7 ;
3144+ pub const CTRL_CMD_DELMCAST_GRP : :: c_int = 8 ;
3145+ pub const CTRL_CMD_GETMCAST_GRP : :: c_int = 9 ;
3146+ pub const CTRL_CMD_GETPOLICY : :: c_int = 10 ;
3147+ //
3148+ pub const CTRL_ATTR_UNSPEC : :: c_int = 0 ;
3149+ pub const CTRL_ATTR_FAMILY_ID : :: c_int = 1 ;
3150+ pub const CTRL_ATTR_FAMILY_NAME : :: c_int = 2 ;
3151+ pub const CTRL_ATTR_VERSION : :: c_int = 3 ;
3152+ pub const CTRL_ATTR_HDRSIZE : :: c_int = 4 ;
3153+ pub const CTRL_ATTR_MAXATTR : :: c_int = 5 ;
3154+ pub const CTRL_ATTR_OPS : :: c_int = 6 ;
3155+ pub const CTRL_ATTR_MCAST_GROUPS : :: c_int = 7 ;
3156+ pub const CTRL_ATTR_POLICY : :: c_int = 8 ;
3157+ pub const CTRL_ATTR_OP_POLICY : :: c_int = 9 ;
3158+ pub const CTRL_ATTR_OP : :: c_int = 10 ;
3159+ //
3160+ pub const CTRL_ATTR_MCAST_GRP_UNSPEC : :: c_int = 0 ;
3161+ pub const CTRL_ATTR_MCAST_GRP_NAME : :: c_int = 1 ;
3162+ pub const CTRL_ATTR_MCAST_GRP_ID : :: c_int = 2 ;
3163+
3164+ // pcap/nflog.h
3165+ pub const NFULA_PACKET_HDR : :: c_int = 1 ;
3166+ pub const NFULA_MARK : :: c_int = 2 ;
3167+ pub const NFULA_TIMESTAMP : :: c_int = 3 ;
3168+ pub const NFULA_IFINDEX_INDEV : :: c_int = 4 ;
3169+ pub const NFULA_IFINDEX_OUTDEV : :: c_int = 5 ;
3170+ pub const NFULA_IFINDEX_PHYSINDEV : :: c_int = 6 ;
3171+ pub const NFULA_IFINDEX_PHYSOUTDEV : :: c_int = 7 ;
3172+ pub const NFULA_HWADDR : :: c_int = 8 ;
3173+ pub const NFULA_PAYLOAD : :: c_int = 9 ;
3174+ pub const NFULA_PREFIX : :: c_int = 10 ;
3175+ pub const NFULA_UID : :: c_int = 11 ;
3176+ pub const NFULA_SEQ : :: c_int = 12 ;
3177+ pub const NFULA_SEQ_GLOBAL : :: c_int = 13 ;
3178+ pub const NFULA_GID : :: c_int = 14 ;
3179+ pub const NFULA_HWTYPE : :: c_int = 15 ;
3180+ pub const NFULA_HWHEADER : :: c_int = 16 ;
3181+ pub const NFULA_HWLEN : :: c_int = 17 ;
31013182
31023183pub const LOCAL_CREDS : :: c_int = 2 ;
31033184pub const LOCAL_CREDS_PERSISTENT : :: c_int = 3 ;
0 commit comments