/linux-master/drivers/scsi/ |
H A D | scsi_netlink.c | 34 struct nlmsghdr *nlh; local 42 nlh = nlmsg_hdr(skb); 43 if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) || 44 (skb->len < nlh->nlmsg_len)) { 50 rlen = NLMSG_ALIGN(nlh->nlmsg_len); 54 if (nlh->nlmsg_type != SCSI_TRANSPORT_MSG) { 59 hdr = nlmsg_data(nlh); 71 if (nlh->nlmsg_len < (sizeof(*nlh) [all...] |
/linux-master/net/phonet/ |
H A D | pn_netlink.c | 51 static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, argument 69 err = nlmsg_parse_deprecated(nlh, sizeof(*ifm), tb, IFA_MAX, 74 ifm = nlmsg_data(nlh); 86 if (nlh->nlmsg_type == RTM_NEWADDR) 91 phonet_address_notify(nlh->nlmsg_type, dev, pnaddr); 99 struct nlmsghdr *nlh; local 101 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*ifm), 0); 102 if (nlh == NULL) 105 ifm = nlmsg_data(nlh); 113 nlmsg_end(skb, nlh); 164 struct nlmsghdr *nlh; local 218 route_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument [all...] |
/linux-master/samples/connector/ |
H A D | cn_test.c | 46 struct nlmsghdr *nlh; 59 nlh = nlmsg_put(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh), 0); 60 if (!nlh) { 65 msg = nlmsg_data(nlh);
|
H A D | ucon.c | 48 struct nlmsghdr *nlh; local 56 nlh = (struct nlmsghdr *)buf; 57 nlh->nlmsg_seq = seq++; 58 nlh->nlmsg_pid = getpid(); 59 nlh->nlmsg_type = NLMSG_DONE; 60 nlh->nlmsg_len = size; 61 nlh->nlmsg_flags = 0; 63 m = NLMSG_DATA(nlh); 70 err = send(s, nlh, size, 0);
|
/linux-master/tools/include/uapi/linux/ |
H A D | netlink.h | 94 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 95 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 96 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 97 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 98 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 99 (nlh)->nlmsg_len <= (len)) 100 #define NLMSG_PAYLOAD(nlh,le [all...] |
/linux-master/crypto/ |
H A D | crypto_user_base.c | 159 struct nlmsghdr *nlh; local 163 nlh = nlmsg_put(skb, NETLINK_CB(in_skb).portid, info->nlmsg_seq, 165 if (!nlh) { 170 ualg = nlmsg_data(nlh); 174 nlmsg_cancel(skb, nlh); 178 nlmsg_end(skb, nlh); 234 info.nlmsg_seq = cb->nlh->nlmsg_seq; 260 static int crypto_update_alg(struct sk_buff *skb, struct nlmsghdr *nlh, argument 264 struct crypto_user_alg *p = nlmsg_data(nlh); 296 static int crypto_del_alg(struct sk_buff *skb, struct nlmsghdr *nlh, argument 334 crypto_add_alg(struct sk_buff *skb, struct nlmsghdr *nlh, struct nlattr **attrs) argument 382 crypto_del_rng(struct sk_buff *skb, struct nlmsghdr *nlh, struct nlattr **attrs) argument 422 crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument [all...] |
H A D | crypto_user_stat.c | 111 struct nlmsghdr *nlh; local 115 nlh = nlmsg_put(skb, NETLINK_CB(in_skb).portid, info->nlmsg_seq, 117 if (!nlh) { 122 ualg = nlmsg_data(nlh); 126 nlmsg_cancel(skb, nlh); 130 nlmsg_end(skb, nlh);
|
/linux-master/drivers/block/drbd/ |
H A D | drbd_nl.c | 3219 static struct nlattr *find_cfg_context_attr(const struct nlmsghdr *nlh, int attr) argument 3225 nla = nla_find(nlmsg_attrdata(nlh, hdrlen), nlmsg_attrlen(nlh, hdrlen), 3262 cb->nlh->nlmsg_seq, &drbd_genl_family, 3358 resource_filter = find_cfg_context_attr(cb->nlh, T_ctx_resource_name); 3385 cb->nlh->nlmsg_seq, &drbd_genl_family, 3447 resource_filter = find_cfg_context_attr(cb->nlh, T_ctx_resource_name); 3511 cb->nlh->nlmsg_seq, &drbd_genl_family, 3608 resource_filter = find_cfg_context_attr(cb->nlh, T_ctx_resource_name); 3653 cb->nlh [all...] |
/linux-master/drivers/connector/ |
H A D | connector.c | 68 struct nlmsghdr *nlh; local 101 nlh = nlmsg_put(skb, 0, msg->seq, NLMSG_DONE, size, 0); 102 if (!nlh) { 107 data = nlmsg_data(nlh); 136 struct nlmsghdr *nlh; local 144 nlh = nlmsg_hdr(skb); 145 if (nlh->nlmsg_len < NLMSG_HDRLEN + sizeof(struct cn_msg) + msg->len) 200 struct nlmsghdr *nlh; local 204 nlh = nlmsg_hdr(skb); 205 len = nlmsg_len(nlh); [all...] |
/linux-master/drivers/dpll/ |
H A D | dpll_netlink.c | 1225 cb->nlh->nlmsg_seq, 1400 cb->nlh->nlmsg_seq, &dpll_nl_family,
|
/linux-master/drivers/infiniband/core/ |
H A D | addr.c | 83 static inline bool ib_nl_is_good_ip_resp(const struct nlmsghdr *nlh) argument 88 if (nlh->nlmsg_flags & RDMA_NL_LS_F_ERR) 91 ret = nla_parse_deprecated(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh), 92 nlmsg_len(nlh), ib_nl_addr_policy, NULL); 99 static void ib_nl_process_good_ip_rsep(const struct nlmsghdr *nlh) argument 107 head = (const struct nlattr *)nlmsg_data(nlh); 108 len = nlmsg_len(nlh); 117 if (nlh->nlmsg_seq != req->seq) 133 struct nlmsghdr *nlh, 136 if ((nlh 132 ib_nl_handle_ip_res_resp(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 151 struct nlmsghdr *nlh; local [all...] |
H A D | core_priv.h | 206 struct nlmsghdr *nlh, 209 struct nlmsghdr *nlh, 212 struct nlmsghdr *nlh,
|
H A D | iwpm_msg.c | 67 struct nlmsghdr *nlh; local 75 skb = iwpm_create_nlmsg(RDMA_NL_IWPM_REG_PID, &nlh, nl_client); 80 nlh->nlmsg_seq = iwpm_get_nlmsg_seq(); 81 nlmsg_request = iwpm_get_nlmsg_request(nlh->nlmsg_seq, nl_client, GFP_KERNEL); 90 ret = ibnl_put_attr(skb, nlh, sizeof(u32), &msg_seq, IWPM_NLA_REG_PID_SEQ); 93 ret = ibnl_put_attr(skb, nlh, IFNAMSIZ, 97 ret = ibnl_put_attr(skb, nlh, IWPM_DEVNAME_SIZE, 101 ret = ibnl_put_attr(skb, nlh, IWPM_ULIBNAME_SIZE, 106 nlmsg_end(skb, nlh); 147 struct nlmsghdr *nlh; local 230 struct nlmsghdr *nlh; local 317 struct nlmsghdr *nlh; local [all...] |
H A D | iwpm_util.c | 438 struct sk_buff *iwpm_create_nlmsg(u32 nl_op, struct nlmsghdr **nlh, argument 447 if (!(ibnl_put_msg(skb, nlh, 0, 0, nl_client, nl_op, 465 ret = nlmsg_validate_deprecated(cb->nlh, nlh_len, policy_max - 1, 471 ret = nlmsg_parse_deprecated(cb->nlh, nlh_len, nltb, policy_max - 1, 581 struct nlmsghdr *nlh; local 586 skb = iwpm_create_nlmsg(RDMA_NL_IWPM_MAPINFO_NUM, &nlh, nl_client); 591 nlh->nlmsg_seq = iwpm_get_nlmsg_seq(); 594 ret = ibnl_put_attr(skb, nlh, sizeof(u32), &msg_seq, IWPM_NLA_MAPINFO_SEQ); 597 ret = ibnl_put_attr(skb, nlh, sizeof(u32), 602 nlmsg_end(skb, nlh); 620 struct nlmsghdr *nlh = NULL; local 642 struct nlmsghdr *nlh; local 764 struct nlmsghdr *nlh; local [all...] |
H A D | iwpm_util.h | 224 * @nlh: Holds address of the netlink message header in skb 230 struct sk_buff *iwpm_create_nlmsg(u32 nl_op, struct nlmsghdr **nlh,
|
H A D | netlink.c | 131 void *ibnl_put_msg(struct sk_buff *skb, struct nlmsghdr **nlh, int seq, argument 134 *nlh = nlmsg_put(skb, 0, seq, RDMA_NL_GET_TYPE(client, op), len, flags); 135 if (!*nlh) 137 return nlmsg_data(*nlh); 141 int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh, argument 145 nlmsg_cancel(skb, nlh); 152 static int rdma_nl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, argument 155 int type = nlh->nlmsg_type; 181 err = cb_table[op].doit(skb, nlh, extack); 185 if ((nlh 212 struct nlmsghdr *nlh; local [all...] |
H A D | nldev.c | 1048 static int nldev_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, argument 1057 err = nlmsg_parse_deprecated(nlh, 0, tb, RDMA_NLDEV_ATTR_MAX - 1, 1074 nlh = nlmsg_put(msg, NETLINK_CB(skb).portid, nlh->nlmsg_seq, 1077 if (!nlh) { 1086 nlmsg_end(msg, nlh); 1098 static int nldev_set_doit(struct sk_buff *skb, struct nlmsghdr *nlh, argument 1106 err = nlmsg_parse_deprecated(nlh, 0, tb, RDMA_NLDEV_ATTR_MAX - 1, 1157 struct nlmsghdr *nlh; local 1162 nlh 1188 nldev_port_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 1252 struct nlmsghdr *nlh; local 1304 nldev_res_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 1358 struct nlmsghdr *nlh; local 1446 res_get_common_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack, enum rdma_restrack_type res_type, res_fill_func_t fill_func) argument 1542 struct nlmsghdr *nlh; local 1723 nldev_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 1770 nldev_dellink(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 1797 nldev_get_chardev(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 1885 nldev_sys_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 1966 nldev_set_sys_set_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 2081 nldev_stat_set_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 2151 nldev_stat_del_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 2221 stat_get_doit_default_counter(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack, struct nlattr *tb[]) argument 2314 stat_get_doit_qp(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack, struct nlattr *tb[]) argument 2386 nldev_stat_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 2443 nldev_stat_get_counter_status_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument [all...] |
H A D | sa_query.c | 786 struct nlmsghdr *nlh; local 808 data = ibnl_put_msg(skb, &nlh, query->seq, 0, RDMA_NL_LS, 819 nlmsg_end(skb, nlh); 871 const struct nlmsghdr *nlh) 889 head = (const struct nlattr *) nlmsg_data(nlh); 890 len = nlmsg_len(nlh); 989 struct nlmsghdr *nlh, 1000 if (!(nlh->nlmsg_flags & NLM_F_REQUEST) || 1004 ret = nla_parse_deprecated(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh), 1005 nlmsg_len(nlh), ib_nl_polic 870 ib_nl_process_good_resolve_rsp(struct ib_sa_query *query, const struct nlmsghdr *nlh) argument 988 ib_nl_handle_set_timeout(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument 1048 ib_nl_is_good_resolve_resp(const struct nlmsghdr *nlh) argument 1064 ib_nl_handle_resolve_resp(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) argument [all...] |
/linux-master/drivers/net/ethernet/broadcom/bnxt/ |
H A D | bnxt.c | 14442 static int bnxt_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, argument 14452 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
|
/linux-master/drivers/net/ethernet/emulex/benet/ |
H A D | be_main.c | 4969 static int be_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, argument 4981 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
|
/linux-master/drivers/net/ethernet/freescale/dpaa2/ |
H A D | dpaa2-switch.c | 785 u32 seq = dump->cb->nlh->nlmsg_seq; 786 struct nlmsghdr *nlh; local 792 nlh = nlmsg_put(dump->skb, portid, seq, RTM_NEWNEIGH, 794 if (!nlh) 797 ndm = nlmsg_data(nlh); 809 nlmsg_end(dump->skb, nlh); 816 nlmsg_cancel(dump->skb, nlh);
|
/linux-master/drivers/net/ethernet/intel/i40e/ |
H A D | i40e_main.c | 13084 * @nlh: RTNL message 13098 struct nlmsghdr *nlh, 13116 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC); 13097 i40e_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags, struct netlink_ext_ack *extack) argument
|
/linux-master/drivers/net/ethernet/intel/ice/ |
H A D | ice_main.c | 7975 * @nlh: RTNL message 7985 ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, argument 7998 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
|
/linux-master/drivers/net/ethernet/intel/ixgbe/ |
H A D | ixgbe_main.c | 10050 struct nlmsghdr *nlh, u16 flags, 10060 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC); 10049 ixgbe_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags, struct netlink_ext_ack *extack) argument
|
/linux-master/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | en_main.c | 4939 static int mlx5e_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, argument 4949 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
|