mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 12:13:33 +08:00
sd-netlink: add sizes for some IP and Ethernet addresses
Add sizes for some uses of NETLINK_TYPE_IN_ADDR and NETLINK_TYPE_ETHER_ADDR types.
This commit is contained in:
parent
81a965187d
commit
3295d0d896
@ -116,10 +116,10 @@ static const NLType genl_fou_types[] = {
|
||||
[FOU_ATTR_IPPROTO] = { .type = NETLINK_TYPE_U8 },
|
||||
[FOU_ATTR_TYPE] = { .type = NETLINK_TYPE_U8 },
|
||||
[FOU_ATTR_REMCSUM_NOPARTIAL] = { .type = NETLINK_TYPE_FLAG },
|
||||
[FOU_ATTR_LOCAL_V4] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[FOU_ATTR_PEER_V4] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[FOU_ATTR_LOCAL_V6] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[FOU_ATTR_PEER_V6] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[FOU_ATTR_LOCAL_V4] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in_addr) },
|
||||
[FOU_ATTR_PEER_V4] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in_addr) },
|
||||
[FOU_ATTR_LOCAL_V6] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in6_addr) },
|
||||
[FOU_ATTR_PEER_V6] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in6_addr) },
|
||||
[FOU_ATTR_PEER_PORT] = { .type = NETLINK_TYPE_U16 },
|
||||
[FOU_ATTR_IFINDEX] = { .type = NETLINK_TYPE_U32 },
|
||||
};
|
||||
@ -145,12 +145,12 @@ static const NLType genl_l2tp_types[] = {
|
||||
[L2TP_ATTR_LNS_MODE] = { .type = NETLINK_TYPE_U8 },
|
||||
[L2TP_ATTR_USING_IPSEC] = { .type = NETLINK_TYPE_U8 },
|
||||
[L2TP_ATTR_FD] = { .type = NETLINK_TYPE_U32 },
|
||||
[L2TP_ATTR_IP_SADDR] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[L2TP_ATTR_IP_DADDR] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[L2TP_ATTR_IP_SADDR] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in_addr) },
|
||||
[L2TP_ATTR_IP_DADDR] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in_addr) },
|
||||
[L2TP_ATTR_UDP_SPORT] = { .type = NETLINK_TYPE_U16 },
|
||||
[L2TP_ATTR_UDP_DPORT] = { .type = NETLINK_TYPE_U16 },
|
||||
[L2TP_ATTR_IP6_SADDR] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[L2TP_ATTR_IP6_DADDR] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[L2TP_ATTR_IP6_SADDR] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in6_addr) },
|
||||
[L2TP_ATTR_IP6_DADDR] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in6_addr) },
|
||||
[L2TP_ATTR_UDP_ZERO_CSUM6_TX] = { .type = NETLINK_TYPE_FLAG },
|
||||
[L2TP_ATTR_UDP_ZERO_CSUM6_RX] = { .type = NETLINK_TYPE_FLAG },
|
||||
};
|
||||
|
@ -663,7 +663,7 @@ DEFINE_TYPE_SYSTEM(rtnl_bridge_cfm_mep_delete);
|
||||
|
||||
static const NLType rtnl_bridge_cfm_mep_config_types[] = {
|
||||
[IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE] = { .type = NETLINK_TYPE_U32 },
|
||||
[IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC] = { .type = NETLINK_TYPE_ETHER_ADDR },
|
||||
[IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC] = { .type = NETLINK_TYPE_ETHER_ADDR, .size = ETH_ALEN },
|
||||
[IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL] = { .type = NETLINK_TYPE_U32 },
|
||||
[IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID] = { .type = NETLINK_TYPE_U32 },
|
||||
};
|
||||
@ -695,7 +695,7 @@ DEFINE_TYPE_SYSTEM(rtnl_bridge_cfm_cc_rdi);
|
||||
|
||||
static const NLType rtnl_bridge_cfm_cc_ccm_tx_types[] = {
|
||||
[IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE] = { .type = NETLINK_TYPE_U32 },
|
||||
[IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC] = { .type = NETLINK_TYPE_ETHER_ADDR },
|
||||
[IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC] = { .type = NETLINK_TYPE_ETHER_ADDR, .size = ETH_ALEN },
|
||||
[IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE] = { .type = NETLINK_TYPE_U32 },
|
||||
[IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD] = { .type = NETLINK_TYPE_U32 },
|
||||
[IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV] = { .type = NETLINK_TYPE_U32 },
|
||||
@ -906,9 +906,9 @@ static const NLType rtnl_address_types[] = {
|
||||
[IFA_LOCAL] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[IFA_LABEL] = { .type = NETLINK_TYPE_STRING, .size = IFNAMSIZ - 1 },
|
||||
[IFA_BROADCAST] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[IFA_ANYCAST] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[IFA_ANYCAST] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in6_addr) },
|
||||
[IFA_CACHEINFO] = { .type = NETLINK_TYPE_CACHE_INFO, .size = sizeof(struct ifa_cacheinfo) },
|
||||
[IFA_MULTICAST] = { .type = NETLINK_TYPE_IN_ADDR },
|
||||
[IFA_MULTICAST] = { .type = NETLINK_TYPE_IN_ADDR, .size = sizeof(struct in6_addr) },
|
||||
[IFA_FLAGS] = { .type = NETLINK_TYPE_U32 },
|
||||
[IFA_RT_PRIORITY] = { .type = NETLINK_TYPE_U32 },
|
||||
[IFA_TARGET_NETNSID] = { .type = NETLINK_TYPE_S32 },
|
||||
|
Loading…
Reference in New Issue
Block a user