Searched refs:nla (Results 1 – 6 of 6) sorted by relevance
/drivers/block/drbd/ |
D | drbd_nla.c | 6 static int drbd_nla_check_mandatory(int maxtype, struct nlattr *nla) in drbd_nla_check_mandatory() argument 8 struct nlattr *head = nla_data(nla); in drbd_nla_check_mandatory() 9 int len = nla_len(nla); in drbd_nla_check_mandatory() 20 nla_for_each_attr(nla, head, len, rem) { in drbd_nla_check_mandatory() 21 if (nla->nla_type & DRBD_GENLA_F_MANDATORY) { in drbd_nla_check_mandatory() 22 nla->nla_type &= ~DRBD_GENLA_F_MANDATORY; in drbd_nla_check_mandatory() 23 if (nla_type(nla) > maxtype) in drbd_nla_check_mandatory() 30 int drbd_nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla, in drbd_nla_parse_nested() argument 35 err = drbd_nla_check_mandatory(maxtype, nla); in drbd_nla_parse_nested() 37 err = nla_parse_nested(tb, maxtype, nla, policy); in drbd_nla_parse_nested() [all …]
|
D | drbd_nla.h | 4 extern int drbd_nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla, 6 extern struct nlattr *drbd_nla_find_nested(int maxtype, struct nlattr *nla, int attrtype);
|
D | drbd_nl.c | 97 struct nlattr *nla; in drbd_msg_put_info() local 103 nla = nla_nest_start(skb, DRBD_NLA_CFG_REPLY); in drbd_msg_put_info() 104 if (!nla) in drbd_msg_put_info() 109 nla_nest_cancel(skb, nla); in drbd_msg_put_info() 112 nla_nest_end(skb, nla); in drbd_msg_put_info() 161 struct nlattr *nla; in drbd_adm_prepare() local 176 nla = nested_attr_tb[__nla_type(T_ctx_volume)]; in drbd_adm_prepare() 177 if (nla) in drbd_adm_prepare() 178 adm_ctx->volume = nla_get_u32(nla); in drbd_adm_prepare() 179 nla = nested_attr_tb[__nla_type(T_ctx_resource_name)]; in drbd_adm_prepare() [all …]
|
/drivers/scsi/be2iscsi/ |
D | be_iscsi.c | 309 struct nlattr *nla; in beiscsi_set_static_ip() local 315 nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_ADDR); in beiscsi_set_static_ip() 316 if (nla) in beiscsi_set_static_ip() 317 iface_ip = nla_data(nla); in beiscsi_set_static_ip() 319 nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_SUBNET); in beiscsi_set_static_ip() 320 if (nla) in beiscsi_set_static_ip() 321 iface_subnet = nla_data(nla); in beiscsi_set_static_ip() 325 nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_SUBNET); in beiscsi_set_static_ip() 326 if (nla) in beiscsi_set_static_ip() 327 iface_subnet = nla_data(nla); in beiscsi_set_static_ip() [all …]
|
/drivers/net/ |
D | macvlan.c | 1160 struct nlattr *nla, *head; in macvlan_changelink_sources() local 1198 nla_for_each_attr(nla, head, len, rem) { in macvlan_changelink_sources() 1199 if (nla_type(nla) != IFLA_MACVLAN_MACADDR || in macvlan_changelink_sources() 1200 nla_len(nla) != ETH_ALEN) in macvlan_changelink_sources() 1203 addr = nla_data(nla); in macvlan_changelink_sources()
|
D | vxlan.c | 183 static int vxlan_nla_get_addr(union vxlan_addr *ip, struct nlattr *nla) in vxlan_nla_get_addr() argument 185 if (nla_len(nla) >= sizeof(struct in6_addr)) { in vxlan_nla_get_addr() 186 nla_memcpy(&ip->sin6.sin6_addr, nla, sizeof(struct in6_addr)); in vxlan_nla_get_addr() 189 } else if (nla_len(nla) >= sizeof(__be32)) { in vxlan_nla_get_addr() 190 ip->sin.sin_addr.s_addr = nla_get_be32(nla); in vxlan_nla_get_addr() 225 static int vxlan_nla_get_addr(union vxlan_addr *ip, struct nlattr *nla) in vxlan_nla_get_addr() argument 227 if (nla_len(nla) >= sizeof(struct in6_addr)) { in vxlan_nla_get_addr() 229 } else if (nla_len(nla) >= sizeof(__be32)) { in vxlan_nla_get_addr() 230 ip->sin.sin_addr.s_addr = nla_get_be32(nla); in vxlan_nla_get_addr()
|