Home
last modified time | relevance | path

Searched refs:nla (Results 1 – 10 of 10) sorted by relevance

/drivers/block/drbd/
Ddrbd_nla.c7 static int drbd_nla_check_mandatory(int maxtype, struct nlattr *nla) in drbd_nla_check_mandatory() argument
9 struct nlattr *head = nla_data(nla); in drbd_nla_check_mandatory()
10 int len = nla_len(nla); in drbd_nla_check_mandatory()
21 nla_for_each_attr(nla, head, len, rem) { in drbd_nla_check_mandatory()
22 if (nla->nla_type & DRBD_GENLA_F_MANDATORY) { in drbd_nla_check_mandatory()
23 nla->nla_type &= ~DRBD_GENLA_F_MANDATORY; in drbd_nla_check_mandatory()
24 if (nla_type(nla) > maxtype) in drbd_nla_check_mandatory()
31 int drbd_nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla, in drbd_nla_parse_nested() argument
36 err = drbd_nla_check_mandatory(maxtype, nla); in drbd_nla_parse_nested()
38 err = nla_parse_nested_deprecated(tb, maxtype, nla, policy, in drbd_nla_parse_nested()
[all …]
Ddrbd_nla.h5 extern int drbd_nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla,
7 extern struct nlattr *drbd_nla_find_nested(int maxtype, struct nlattr *nla, int attrtype);
Ddrbd_nl.c99 struct nlattr *nla; in drbd_msg_put_info() local
105 nla = nla_nest_start_noflag(skb, DRBD_NLA_CFG_REPLY); in drbd_msg_put_info()
106 if (!nla) in drbd_msg_put_info()
111 nla_nest_cancel(skb, nla); in drbd_msg_put_info()
114 nla_nest_end(skb, nla); in drbd_msg_put_info()
122 struct nlattr *nla, *txt; in drbd_msg_sprintf_info() local
126 nla = nla_nest_start_noflag(skb, DRBD_NLA_CFG_REPLY); in drbd_msg_sprintf_info()
127 if (!nla) in drbd_msg_sprintf_info()
132 nla_nest_cancel(skb, nla); in drbd_msg_sprintf_info()
142 nla_nest_end(skb, nla); in drbd_msg_sprintf_info()
[all …]
/drivers/net/
Dgtp.c1284 static struct gtp_dev *gtp_find_dev(struct net *src_net, struct nlattr *nla[]) in gtp_find_dev() argument
1293 if (nla[GTPA_NET_NS_FD]) in gtp_find_dev()
1294 net = get_net_ns_by_fd(nla_get_u32(nla[GTPA_NET_NS_FD])); in gtp_find_dev()
1302 dev = dev_get_by_index_rcu(net, nla_get_u32(nla[GTPA_LINK])); in gtp_find_dev()
1513 struct nlattr *nla[]) in gtp_find_pdp_by_link() argument
1517 gtp = gtp_find_dev(net, nla); in gtp_find_pdp_by_link()
1521 if (nla[GTPA_MS_ADDRESS]) { in gtp_find_pdp_by_link()
1522 __be32 ip = nla_get_be32(nla[GTPA_MS_ADDRESS]); in gtp_find_pdp_by_link()
1525 } else if (nla[GTPA_VERSION]) { in gtp_find_pdp_by_link()
1526 u32 gtp_version = nla_get_u32(nla[GTPA_VERSION]); in gtp_find_pdp_by_link()
[all …]
Dmacvlan.c1290 struct nlattr *nla, *head; in macvlan_validate() local
1345 nla_for_each_attr(nla, head, len, rem) { in macvlan_validate()
1346 if (nla_type(nla) != IFLA_MACVLAN_MACADDR || in macvlan_validate()
1347 nla_len(nla) != ETH_ALEN) in macvlan_validate()
1350 if (!is_valid_ether_addr(nla_data(nla))) in macvlan_validate()
1372 struct nlattr *nla, *head; in macvlan_changelink_sources() local
1410 nla_for_each_attr(nla, head, len, rem) { in macvlan_changelink_sources()
1411 addr = nla_data(nla); in macvlan_changelink_sources()
Dmacsec.c1499 static enum macsec_offload nla_get_offload(const struct nlattr *nla) in nla_get_offload() argument
1501 return (__force enum macsec_offload)nla_get_u8(nla); in nla_get_offload()
1504 static sci_t nla_get_sci(const struct nlattr *nla) in nla_get_sci() argument
1506 return (__force sci_t)nla_get_u64(nla); in nla_get_sci()
1515 static ssci_t nla_get_ssci(const struct nlattr *nla) in nla_get_ssci() argument
1517 return (__force ssci_t)nla_get_u32(nla); in nla_get_ssci()
/drivers/scsi/be2iscsi/
Dbe_iscsi.c345 struct nlattr *nla; in beiscsi_iface_config_ipv4() local
376 nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_SUBNET); in beiscsi_iface_config_ipv4()
377 if (nla) { in beiscsi_iface_config_ipv4()
378 info = nla_data(nla); in beiscsi_iface_config_ipv4()
390 nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_ADDR); in beiscsi_iface_config_ipv4()
391 if (nla) { in beiscsi_iface_config_ipv4()
392 info = nla_data(nla); in beiscsi_iface_config_ipv4()
/drivers/net/can/dev/
Dnetlink.c108 static int can_tdc_changelink(struct can_priv *priv, const struct nlattr *nla, in can_tdc_changelink() argument
119 err = nla_parse_nested(tb_tdc, IFLA_CAN_TDC_MAX, nla, in can_tdc_changelink()
/drivers/net/vxlan/
Dvxlan_core.c75 static int vxlan_nla_get_addr(union vxlan_addr *ip, struct nlattr *nla) in vxlan_nla_get_addr() argument
77 if (nla_len(nla) >= sizeof(struct in6_addr)) { in vxlan_nla_get_addr()
78 ip->sin6.sin6_addr = nla_get_in6_addr(nla); in vxlan_nla_get_addr()
81 } else if (nla_len(nla) >= sizeof(__be32)) { in vxlan_nla_get_addr()
82 ip->sin.sin_addr.s_addr = nla_get_in_addr(nla); in vxlan_nla_get_addr()
101 static int vxlan_nla_get_addr(union vxlan_addr *ip, struct nlattr *nla) in vxlan_nla_get_addr() argument
103 if (nla_len(nla) >= sizeof(struct in6_addr)) { in vxlan_nla_get_addr()
105 } else if (nla_len(nla) >= sizeof(__be32)) { in vxlan_nla_get_addr()
106 ip->sin.sin_addr.s_addr = nla_get_in_addr(nla); in vxlan_nla_get_addr()
/drivers/net/bonding/
Dbond_netlink.c844 struct nlattr *nla __maybe_unused; in bond_fill_linkxstats()