Home
last modified time | relevance | path

Searched refs:nlp (Results 1 – 25 of 39) sorted by relevance

12

/freebsd-14.2/sys/netlink/
H A Dnetlink_io.c132 if (nlp == NULL) in nl_add_msg_info()
181 taskqueue_enqueue(nlp->nl_taskqueue, &nlp->nl_task); in nl_schedule_taskqueue()
196 NLP_LOCK(nlp); in nl_receive_async()
258 NLP_LOCK(nlp); in nl_process_received_one()
315 NLP_LOCK(nlp); in nl_process_received()
344 NLP_LOCK(nlp); in nl_on_transmit()
381 if (nlp->tx_queue.length > nlp->tx_queue.hiwat) in queue_push_tx()
382 nlp->tx_queue.hiwat = nlp->tx_queue.length; in queue_push_tx()
412 m = linux_netlink_p->mbufs_to_linux(nlp->nl_proto, m, nlp); in nl_send_one()
417 NLP_LOCK(nlp); in nl_send_one()
[all …]
H A Dnetlink_domain.c131 return (nlp); in nl_port_lookup()
345 nl_init_io(nlp); in nl_pru_attach()
349 TASK_INIT(&nlp->nl_task, 0, nl_taskqueue_handler, nlp); in nl_pru_attach()
387 NLP_LOCK(nlp); in nl_pru_bind()
389 NLP_UNLOCK(nlp); in nl_pru_bind()
408 NLP_LOCK(nlp); in nl_assign_port()
411 NLP_UNLOCK(nlp); in nl_assign_port()
479 NLP_LOCK(nlp); in destroy_nlpcb()
480 nl_free_io(nlp); in destroy_nlpcb()
507 NLP_LOCK(nlp); in nl_pru_detach()
[all …]
H A Dnetlink_route.c72 struct nlpcb *nlp = npt->nlp; in rtnl_handle_message() local
86 NLP_LOG(LOG_DEBUG2, nlp, "received msg %s(%d) len %d", cmd->name, in rtnl_handle_message()
89 if (cmd->priv != 0 && !nlp_has_priv(nlp, cmd->priv)) { in rtnl_handle_message()
90 NLP_LOG(LOG_DEBUG2, nlp, "priv %d check failed for msg %s", cmd->priv, cmd->name); in rtnl_handle_message()
93 NLP_LOG(LOG_DEBUG3, nlp, "priv %d check passed for msg %s", cmd->priv, cmd->name); in rtnl_handle_message()
95 if (!nlp_unconstrained_vnet(nlp) && (cmd->flags & RTNL_F_ALLOW_NONVNET_JAIL) == 0) { in rtnl_handle_message()
96 NLP_LOG(LOG_DEBUG2, nlp, "jail check failed for msg %s", cmd->name); in rtnl_handle_message()
104 error = cmd->cb(hdr, nlp, npt); in rtnl_handle_message()
108 NLP_LOG(LOG_DEBUG3, nlp, "message %s -> error %d", cmd->name, error); in rtnl_handle_message()
H A Dnetlink_glue.c86 nlp_has_priv(struct nlpcb *nlp, int priv) in nlp_has_priv() argument
88 return (priv_check_cred(nlp->nl_cred, priv) == 0); in nlp_has_priv()
92 nlp_get_cred(struct nlpcb *nlp) in nlp_get_cred() argument
94 return (nlp->nl_cred); in nlp_get_cred()
98 nlp_get_pid(const struct nlpcb *nlp) in nlp_get_pid() argument
100 return (nlp->nl_process_id); in nlp_get_pid()
104 nlp_unconstrained_vnet(const struct nlpcb *nlp) in nlp_unconstrained_vnet() argument
106 return (nlp->nl_unconstrained_vnet); in nlp_unconstrained_vnet()
123 nlmsg_get_unicast_writer_stub(struct nl_writer *nw, int size, struct nlpcb *nlp) in nlmsg_get_unicast_writer_stub() argument
230 nlmsg_get_unicast_writer(struct nl_writer *nw, int size, struct nlpcb *nlp) in nlmsg_get_unicast_writer() argument
[all …]
H A Dnetlink_var.h139 void nl_set_thread_nlp(struct thread *td, struct nlpcb *nlp);
144 bool nl_send_one(struct mbuf *m, struct nlpcb *nlp, int cnt, int io_flags);
145 void nlmsg_ack(struct nlpcb *nlp, int error, struct nlmsghdr *nlmsg,
147 void nl_on_transmit(struct nlpcb *nlp);
148 void nl_init_io(struct nlpcb *nlp);
149 void nl_free_io(struct nlpcb *nlp);
153 void nl_process_receive_locked(struct nlpcb *nlp);
202 bool (*nlmsg_get_unicast_writer)(struct nl_writer *nw, int size, struct nlpcb *nlp);
H A Dnetlink_generic.c60 struct nlpcb *nlp = npt->nlp; in genl_handle_message() local
67 NLP_LOG(LOG_DEBUG, nlp, "invalid message type: %d", hdr->nlmsg_type); in genl_handle_message()
72 NLP_LOG(LOG_DEBUG, nlp, "invalid message size: %d", hdr->nlmsg_len); in genl_handle_message()
79 NLP_LOG(LOG_DEBUG, nlp, "family %s: invalid cmd %d", in genl_handle_message()
86 if (cmd->cmd_priv != 0 && !nlp_has_priv(nlp, cmd->cmd_priv)) { in genl_handle_message()
87 NLP_LOG(LOG_DEBUG, nlp, "family %s: cmd %d priv_check() failed", in genl_handle_message()
92 NLP_LOG(LOG_DEBUG2, nlp, "received family %s cmd %s(%d) len %d", in genl_handle_message()
H A Dnetlink_message_writer.c421 struct nlpcb *nlp = (struct nlpcb *)(nw->arg.ptr); in nlmsg_write_socket_lbuf() local
430 m = linux_netlink_p->msgs_to_linux(nlp->nl_proto, data, datalen, nlp); in nlmsg_write_socket_lbuf()
439 return (nl_send_one(m, nlp, cnt, io_flags)); in nlmsg_write_socket_lbuf()
535 if (!nlmsg_get_buf(nw, size, false, nlp->nl_linux)) in _nlmsg_get_unicast_writer()
537 nw->arg.ptr = (void *)nlp; in _nlmsg_get_unicast_writer()
718 nlmsg_ack(struct nlpcb *nlp, int error, struct nlmsghdr *hdr, in nlmsg_ack() argument
723 uint32_t flags = nlp->nl_flags; in nlmsg_ack()
740 if ((npt->err_msg || npt->err_off) && nlp->nl_flags & NLF_EXT_ACK) in nlmsg_ack()
754 if (npt->err_msg != NULL && nlp->nl_flags & NLF_EXT_ACK) in nlmsg_ack()
756 if (npt->err_off != 0 && nlp->nl_flags & NLF_EXT_ACK) in nlmsg_ack()
[all …]
H A Dnetlink_ctl.h83 bool nlp_has_priv(struct nlpcb *nlp, int priv);
84 struct ucred *nlp_get_cred(struct nlpcb *nlp);
85 uint32_t nlp_get_pid(const struct nlpcb *nlp);
86 bool nlp_unconstrained_vnet(const struct nlpcb *nlp);
H A Dnetlink_linux.h39 struct nlpcb *nlp);
41 struct nlpcb *nlp);
/freebsd-14.2/usr.bin/gprof/
H A Darcs.c356 register nltype *nlp; in cyclelink() local
366 for ( nlp = nl ; nlp < npe ; nlp++ ) { in cyclelink()
370 if ( nlp -> cyclehead == nlp && nlp -> cnext != 0 ) { in cyclelink()
387 for ( nlp = nl ; nlp < npe ; nlp++ ) { in cyclelink()
388 if ( !( nlp -> cyclehead == nlp && nlp -> cnext != 0 ) ) { in cyclelink()
413 printname( nlp ); in cyclelink()
454 nltype *nlp; in cycleanalyze() local
468 for (nlp = cyclenl[ cycleno ] . cnext; nlp; nlp = nlp -> cnext) { in cycleanalyze()
470 nlp -> parentcnt = 0; in cycleanalyze()
473 nlp -> parentcnt += 1; in cycleanalyze()
[all …]
H A Dgprof.c349 register nltype *nlp; in dumpsum() local
369 for ( nlp = nl ; nlp < npe ; nlp++ ) { in dumpsum()
370 for ( arcp = nlp -> children ; arcp ; arcp = arcp -> arc_childlist ) { in dumpsum()
573 register struct nl *nlp; in alignentries() local
577 for (nlp = nl; nlp < npe; nlp++) { in alignentries()
578 nlp -> svalue = nlp -> value / HISTORICAL_SCALE_2; in alignentries()
579 bucket_of_entry = (nlp->svalue - lowpc) / scale; in alignentries()
580 bucket_of_code = (nlp->svalue + OFFSET_OF_CODE / HISTORICAL_SCALE_2 - in alignentries()
586 nlp->svalue, in alignentries()
587 nlp->svalue + OFFSET_OF_CODE / HISTORICAL_SCALE_2); in alignentries()
[all …]
H A Dprintgprof.c705 register nltype *nlp; in printindex() local
729 nlp = namesortnlp[ j ]; in printindex()
730 if ( nlp -> printflag ) { in printindex()
731 sprintf( peterbuffer , "[%d]" , nlp -> index ); in printindex()
733 sprintf( peterbuffer , "(%d)" , nlp -> index ); in printindex()
736 printf( "%6.6s %-19.19s" , peterbuffer , nlp -> name ); in printindex()
739 sprintf( peterbuffer , "<cycle %d>" , nlp -> cycleno ); in printindex()
/freebsd-14.2/share/examples/sunrpc/dir/
H A Ddir_proc.c20 namelist *nlp; local
40 nlp = &res.readdir_res_u.list;
42 nl = *nlp = (namenode *) malloc(sizeof(namenode));
45 nlp = &nl->next;
47 *nlp = NULL;
/freebsd-14.2/sys/compat/linux/
H A Dlinux_netlink.c334 rtnl_newlink_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_newlink_to_linux() argument
369 rtnl_newaddr_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_newaddr_to_linux() argument
391 rtnl_newneigh_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_newneigh_to_linux() argument
468 return (rtnl_newlink_to_linux(hdr, nlp, nw)); in rtnl_to_linux()
471 return (rtnl_newaddr_to_linux(hdr, nlp, nw)); in rtnl_to_linux()
474 return (rtnl_newroute_to_linux(hdr, nlp, nw)); in rtnl_to_linux()
478 return (rtnl_newneigh_to_linux(hdr, nlp, nw)); in rtnl_to_linux()
527 return (nlmsg_error_to_linux(hdr, nlp, nw)); in nlmsg_to_linux()
541 return (rtnl_to_linux(hdr, nlp, nw)); in nlmsg_to_linux()
567 if (!nlmsg_to_linux(netlink_family, hdr, nlp, &nw)) { in nlmsgs_to_linux()
[all …]
/freebsd-14.2/share/examples/ipfilter/samples/
H A Dproxy.c133 do_nat_out(in, out, fd, nlp, extif) in do_nat_out() argument
135 natlookup_t *nlp;
163 usin.sin_addr = nlp->nl_realip;
164 usin.sin_port = nlp->nl_realport;
182 nat->nat_outip = nlp->nl_outip;
183 nat->nat_oip = nlp->nl_realip;
186 sum2 = LONG_SUM(ntohl(nat->nat_outip.s_addr)) + ntohs(nlp->nl_outport);
197 nat->nat_outport = nlp->nl_outport;
198 nat->nat_oport = nlp->nl_realport;
217 usin.sin_addr = nlp->nl_realip;
[all …]
/freebsd-14.2/sys/netlink/route/
H A Diface.c462 .so = nlp, in rtnl_handle_getlink()
680 return (create_link(hdr, &attrs, &bm, nlp, npt)); in rtnl_handle_newlink()
682 return (modify_link(hdr, &attrs, &bm, nlp, npt)); in rtnl_handle_newlink()
1069 .so = nlp, in rtnl_handle_getaddr()
1071 .cred = nlp_get_cred(nlp), in rtnl_handle_getaddr()
1111 if_t ifp, struct nlpcb *nlp, struct nl_pstate *npt) in handle_newaddr_inet() argument
1195 if_t ifp, struct nlpcb *nlp, struct nl_pstate *npt) in handle_deladdr_inet() argument
1216 if_t ifp, struct nlpcb *nlp, struct nl_pstate *npt) in handle_newaddr_inet6() argument
1279 if_t ifp, struct nlpcb *nlp, struct nl_pstate *npt) in handle_deladdr_inet6() argument
1334 error = handle_newaddr_inet(hdr, &attrs, ifp, nlp, npt); in rtnl_handle_addr()
[all …]
H A Droute_var.h40 typedef int rtnl_msg_cb_f(struct nlmsghdr *hdr, struct nlpcb *nlp,
108 const struct nlattr_bmask *bm, struct nlpcb *nlp, struct nl_pstate *npt);
110 const struct nlattr_bmask *bm, struct nlpcb *nlp, struct nl_pstate *npt);
H A Drt.c351 struct nlpcb *nlp, struct nlmsghdr *hdr) in report_operation() argument
532 struct nlpcb *nlp; member
550 if (!rt_is_exportable(rt, nlp_get_cred(wa->nlp))) in dump_rtentry()
648 if (!rt_is_exportable(rt, nlp_get_cred(nlp))) in handle_rtm_getroute()
665 handle_rtm_dump(struct nlpcb *nlp, uint32_t fibnum, int family, in handle_rtm_dump() argument
669 .nlp = nlp, in handle_rtm_dump()
926 rtnl_handle_newroute(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_handle_newroute() argument
975 report_operation(attrs.rta_table, &rc, nlp, hdr); in rtnl_handle_newroute()
994 rtnl_handle_delroute(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_handle_delroute() argument
1018 report_operation(attrs.rta_table, &rc, nlp, hdr); in rtnl_handle_delroute()
[all …]
H A Diface_drivers.c72 if (nlp_has_priv(npt->nlp, PRIV_NET_SETIFDESCR)) { in _nl_modify_ifp_generic()
91 if (nlp_has_priv(npt->nlp, PRIV_NET_SETIFMTU)) { in _nl_modify_ifp_generic()
/freebsd-14.2/contrib/libarchive/libarchive/test/
H A Dtest_write_disk_mac_metadata.c67 char *nl, *nlp; in has_xattr() local
88 for (nlp = nl; nlp < nl + r; nlp += strlen(nlp) + 1) { in has_xattr()
89 if (strcmp(nlp, xattrname) == 0) { in has_xattr()
H A Dtest_write_disk_no_hfs_compression.c37 char *nl, *nlp; in has_xattr() local
58 for (nlp = nl; nlp < nl + r; nlp += strlen(nlp) + 1) { in has_xattr()
59 if (strcmp(nlp, xattrname) == 0) { in has_xattr()
H A Dtest_write_disk_hfs_compression.c37 char *nl, *nlp; in has_xattr() local
58 for (nlp = nl; nlp < nl + r; nlp += strlen(nlp) + 1) { in has_xattr()
59 if (strcmp(nlp, xattrname) == 0) { in has_xattr()
H A Dtest_write_disk_appledouble.c67 char *nl, *nlp; in has_xattr() local
88 for (nlp = nl; nlp < nl + r; nlp += strlen(nlp) + 1) { in has_xattr()
89 if (strcmp(nlp, xattrname) == 0) { in has_xattr()
/freebsd-14.2/contrib/sendmail/src/
H A Dalias.c678 char *nlp; local
681 nlp = &p[strlen(p)];
682 if (nlp > p && nlp[-1] == '\n')
683 *--nlp = '\0';
684 return nlp;
857 register char *nlp; local
859 nlp = &p[strlen(p)];
860 if (nlp > p && nlp[-1] == '\n')
861 *--nlp = '\0';
884 p = nlp;
/freebsd-14.2/contrib/libpcap/
H A Dpcap-snit.c120 register struct nit_iflen *nlp; in pcap_read_snit() local
183 nlp = (struct nit_iflen *)cp; in pcap_read_snit()
184 cp += sizeof(*nlp); in pcap_read_snit()
189 caplen = nlp->nh_pktlen; in pcap_read_snit()
193 if (pcapint_filter(p->fcode.bf_insns, cp, nlp->nh_pktlen, caplen)) { in pcap_read_snit()
196 h.len = nlp->nh_pktlen; in pcap_read_snit()

12