• Home
  • Raw
  • Download

Lines Matching refs:nlh

206 static int inet_diag_parse_attrs(const struct nlmsghdr *nlh, int hdrlen,  in inet_diag_parse_attrs()  argument
212 nlmsg_for_each_attr(nla, nlh, hdrlen, remaining) { in inet_diag_parse_attrs()
244 struct nlmsghdr *nlh; in inet_sk_diag_fill() local
252 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in inet_sk_diag_fill()
253 cb->nlh->nlmsg_type, sizeof(*r), nlmsg_flags); in inet_sk_diag_fill()
254 if (!nlh) in inet_sk_diag_fill()
257 r = nlmsg_data(nlh); in inet_sk_diag_fill()
367 bool first_nlmsg = ((unsigned char *)nlh == skb->data); in inet_sk_diag_fill()
373 msg_len = skb_tail_pointer(skb) - (unsigned char *)nlh; in inet_sk_diag_fill()
405 nlmsg_end(skb, nlh); in inet_sk_diag_fill()
409 nlmsg_cancel(skb, nlh); in inet_sk_diag_fill()
421 struct nlmsghdr *nlh; in inet_twsk_diag_fill() local
424 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, in inet_twsk_diag_fill()
425 cb->nlh->nlmsg_seq, cb->nlh->nlmsg_type, in inet_twsk_diag_fill()
427 if (!nlh) in inet_twsk_diag_fill()
430 r = nlmsg_data(nlh); in inet_twsk_diag_fill()
445 nlmsg_end(skb, nlh); in inet_twsk_diag_fill()
455 struct nlmsghdr *nlh; in inet_req_diag_fill() local
458 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in inet_req_diag_fill()
459 cb->nlh->nlmsg_type, sizeof(*r), nlmsg_flags); in inet_req_diag_fill()
460 if (!nlh) in inet_req_diag_fill()
463 r = nlmsg_data(nlh); in inet_req_diag_fill()
481 nlmsg_cancel(skb, nlh); in inet_req_diag_fill()
485 nlmsg_end(skb, nlh); in inet_req_diag_fill()
589 const struct nlmsghdr *nlh, in inet_diag_cmd_exact() argument
598 err = inet_diag_parse_attrs(nlh, hdrlen, dump_data.req_nlas); in inet_diag_cmd_exact()
609 .nlh = nlh, in inet_diag_cmd_exact()
1192 return __inet_diag_dump(skb, cb, nlmsg_data(cb->nlh)); in inet_diag_dump()
1197 const struct nlmsghdr *nlh = cb->nlh; in __inet_diag_dump_start() local
1207 err = inet_diag_parse_attrs(nlh, hdrlen, cb_data->req_nlas); in __inet_diag_dump_start()
1272 struct inet_diag_req *rc = nlmsg_data(cb->nlh); in inet_diag_dump_compat()
1276 req.sdiag_protocol = inet_diag_type2proto(cb->nlh->nlmsg_type); in inet_diag_dump_compat()
1285 const struct nlmsghdr *nlh) in inet_diag_get_exact_compat() argument
1287 struct inet_diag_req *rc = nlmsg_data(nlh); in inet_diag_get_exact_compat()
1291 req.sdiag_protocol = inet_diag_type2proto(nlh->nlmsg_type); in inet_diag_get_exact_compat()
1296 return inet_diag_cmd_exact(SOCK_DIAG_BY_FAMILY, in_skb, nlh, in inet_diag_get_exact_compat()
1300 static int inet_diag_rcv_msg_compat(struct sk_buff *skb, struct nlmsghdr *nlh) in inet_diag_rcv_msg_compat() argument
1305 if (nlh->nlmsg_type >= INET_DIAG_GETSOCK_MAX || in inet_diag_rcv_msg_compat()
1306 nlmsg_len(nlh) < hdrlen) in inet_diag_rcv_msg_compat()
1309 if (nlh->nlmsg_flags & NLM_F_DUMP) { in inet_diag_rcv_msg_compat()
1315 return netlink_dump_start(net->diag_nlsk, skb, nlh, &c); in inet_diag_rcv_msg_compat()
1318 return inet_diag_get_exact_compat(skb, nlh); in inet_diag_rcv_msg_compat()
1347 struct nlmsghdr *nlh; in inet_diag_handler_get_info() local
1353 nlh = nlmsg_put(skb, 0, 0, SOCK_DIAG_BY_FAMILY, sizeof(*r), 0); in inet_diag_handler_get_info()
1354 if (!nlh) in inet_diag_handler_get_info()
1357 r = nlmsg_data(nlh); in inet_diag_handler_get_info()
1365 nlmsg_cancel(skb, nlh); in inet_diag_handler_get_info()
1372 nlmsg_cancel(skb, nlh); in inet_diag_handler_get_info()
1387 nlmsg_end(skb, nlh); in inet_diag_handler_get_info()