/freebsd/sys/netlink/ |
H A D | netlink_io.c | 54 static bool nl_process_nbuf(struct nl_buf *nb, struct nlpcb *nlp); 81 nl_schedule_taskqueue(struct nlpcb *nlp) in nl_schedule_taskqueue() argument 83 if (!nlp->nl_task_pending) { in nl_schedule_taskqueue() 84 nlp->nl_task_pending = true; in nl_schedule_taskqueue() 85 taskqueue_enqueue(nlp->nl_taskqueue, &nlp->nl_task); in nl_schedule_taskqueue() 93 nl_process_received_one(struct nlpcb *nlp) in nl_process_received_one() argument 95 struct socket *so = nlp->nl_socket; in nl_process_received_one() 100 NLP_LOCK(nlp); in nl_process_received_one() 101 nlp->nl_task_pending = false; in nl_process_received_one() 102 NLP_UNLOCK(nlp); in nl_process_received_one() [all …]
|
H A D | netlink_domain.c | 114 nl_set_thread_nlp(struct thread *td, struct nlpcb *nlp) in nl_set_thread_nlp() argument 116 NLP_LOG(LOG_DEBUG2, nlp, "Set thread %p nlp to %p (slot %u)", td, nlp, osd_slot_id); in nl_set_thread_nlp() 117 if (osd_set(OSD_THREAD, &td->td_osd, osd_slot_id, nlp) == 0) in nl_set_thread_nlp() 121 osd_set_reserved(OSD_THREAD, &td->td_osd, osd_slot_id, rsv, nlp); in nl_set_thread_nlp() 131 struct nlpcb *nlp; in nl_port_lookup() local 133 CK_LIST_FOREACH(nlp, &V_nl_ctl.ctl_port_head, nl_port_next) { in nl_port_lookup() 134 if (nlp->nl_port == port_id) in nl_port_lookup() 135 return (nlp); in nl_port_lookup() 141 nlp_join_group(struct nlpcb *nlp, unsigned int group_id) in nlp_join_group() argument 147 if (!nlp_unconstrained_vnet(nlp)) in nlp_join_group() [all …]
|
H A D | netlink_route.c | 71 struct nlpcb *nlp = npt->nlp; in rtnl_handle_message() local 85 NLP_LOG(LOG_DEBUG2, nlp, "received msg %s(%d) len %d", cmd->name, in rtnl_handle_message() 88 if (cmd->priv != 0 && !nlp_has_priv(nlp, cmd->priv)) { in rtnl_handle_message() 89 NLP_LOG(LOG_DEBUG2, nlp, "priv %d check failed for msg %s", cmd->priv, cmd->name); in rtnl_handle_message() 92 NLP_LOG(LOG_DEBUG3, nlp, "priv %d check passed for msg %s", cmd->priv, cmd->name); in rtnl_handle_message() 94 if (!nlp_unconstrained_vnet(nlp) && (cmd->flags & RTNL_F_ALLOW_NONVNET_JAIL) == 0) { in rtnl_handle_message() 95 NLP_LOG(LOG_DEBUG2, nlp, "jail check failed for msg %s", cmd->name); in rtnl_handle_message() 103 error = cmd->cb(hdr, nlp, npt); in rtnl_handle_message() 107 NLP_LOG(LOG_DEBUG3, nlp, "message %s -> error %d", cmd->name, error); in rtnl_handle_message()
|
H A D | netlink_glue.c | 86 nlp_has_priv(struct nlpcb *nlp, int priv) in nlp_has_priv() argument 88 return (priv_check_cred(nlp->nl_socket->so_cred, priv) == 0); in nlp_has_priv() 92 nlp_get_cred(struct nlpcb *nlp) in nlp_get_cred() argument 94 return (nlp->nl_socket->so_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() 113 nl_writer_unicast_stub(struct nl_writer *nw, size_t size, struct nlpcb *nlp, in nl_writer_unicast_stub() argument 216 nl_writer_unicast(struct nl_writer *nw, size_t size, struct nlpcb *nlp, in nl_writer_unicast() argument [all …]
|
H A D | netlink_message_writer.c | 72 return (nl_send(nw, nw->nlp)); in nl_send_one() 76 _nl_writer_unicast(struct nl_writer *nw, size_t size, struct nlpcb *nlp, in _nl_writer_unicast() argument 80 .nlp = nlp, in _nl_writer_unicast() 267 nlmsg_ack(struct nlpcb *nlp, int error, struct nlmsghdr *hdr, in nlmsg_ack() argument 272 uint32_t flags = nlp->nl_flags; in nlmsg_ack() 289 if ((npt->err_msg || npt->err_off) && nlp->nl_flags & NLF_EXT_ACK) in nlmsg_ack() 295 if (!nlmsg_add(nw, nlp->nl_port, hdr->nlmsg_seq, NLMSG_ERROR, nl_flags, payload_len)) in nlmsg_ack() 303 if (npt->err_msg != NULL && nlp->nl_flags & NLF_EXT_ACK) in nlmsg_ack() 305 if (npt->err_off != 0 && nlp->nl_flags & NLF_EXT_ACK) in nlmsg_ack() 313 NLP_LOG(LOG_DEBUG, nlp, "error allocating ack data for message %d seq %u", in nlmsg_ack()
|
H A D | netlink_var.h | 127 void nl_set_thread_nlp(struct thread *td, struct nlpcb *nlp); 131 void nlmsg_ack(struct nlpcb *nlp, int error, struct nlmsghdr *nlmsg, 133 void nl_on_transmit(struct nlpcb *nlp); 136 void nl_schedule_taskqueue(struct nlpcb *nlp); 137 void nl_process_receive_locked(struct nlpcb *nlp); 167 struct nlpcb *nlp, bool waitok);
|
H A D | netlink_ctl.h | 80 bool nlp_has_priv(struct nlpcb *nlp, int priv); 81 struct ucred *nlp_get_cred(struct nlpcb *nlp); 82 uint32_t nlp_get_pid(const struct nlpcb *nlp); 83 bool nlp_unconstrained_vnet(const struct nlpcb *nlp);
|
H A D | netlink_generic.c | 116 struct nlpcb *nlp = npt->nlp; in genl_handle_message() local 123 NLP_LOG(LOG_DEBUG, nlp, "invalid message size: %d", in genl_handle_message() 132 NLP_LOG(LOG_DEBUG, nlp, "invalid message type: %d", in genl_handle_message() 140 NLP_LOG(LOG_DEBUG, nlp, "family %s: invalid cmd %d", in genl_handle_message() 147 if (cmd->cmd_priv != 0 && !nlp_has_priv(nlp, cmd->cmd_priv)) { in genl_handle_message() 148 NLP_LOG(LOG_DEBUG, nlp, "family %s: cmd %d priv_check() failed", in genl_handle_message() 153 NLP_LOG(LOG_DEBUG2, nlp, "received family %s cmd %s(%d) len %d", in genl_handle_message()
|
H A D | netlink_message_writer.h | 49 struct nlpcb *nlp; member 70 bool _nl_writer_unicast(struct nl_writer *, size_t, struct nlpcb *nlp, bool); 86 nl_writer_unicast(struct nl_writer *nw, size_t size, struct nlpcb *nlp, in nl_writer_unicast() argument 89 return (_nl_writer_unicast(nw, size, nlp, waitok)); in nl_writer_unicast()
|
/freebsd/usr.bin/gprof/ |
H A D | arcs.c | 350 register nltype *nlp; in cyclelink() local 360 for ( nlp = nl ; nlp < npe ; nlp++ ) { in cyclelink() 364 if ( nlp -> cyclehead == nlp && nlp -> cnext != 0 ) { in cyclelink() 381 for ( nlp = nl ; nlp < npe ; nlp++ ) { in cyclelink() 382 if ( !( nlp -> cyclehead == nlp && nlp -> cnext != 0 ) ) { in cyclelink() 401 cyclenlp -> cnext = nlp; /* pointer to next member of cycle */ in cyclelink() 407 printname( nlp ); in cyclelink() 414 for ( memberp = nlp ; memberp ; memberp = memberp -> cnext ) { in cyclelink() 422 for ( memberp = nlp ; memberp ; memberp = memberp -> cnext ) { in cyclelink() 448 nltype *nlp; in cycleanalyze() local [all …]
|
H A D | gprof.c | 336 register nltype *nlp; in dumpsum() local 356 for ( nlp = nl ; nlp < npe ; nlp++ ) { in dumpsum() 357 for ( arcp = nlp -> children ; arcp ; arcp = arcp -> arc_childlist ) { in dumpsum() 560 register struct nl *nlp; in alignentries() local 564 for (nlp = nl; nlp < npe; nlp++) { in alignentries() 565 nlp -> svalue = nlp -> value / HISTORICAL_SCALE_2; in alignentries() 566 bucket_of_entry = (nlp->svalue - lowpc) / scale; in alignentries() 567 bucket_of_code = (nlp->svalue + OFFSET_OF_CODE / HISTORICAL_SCALE_2 - in alignentries() 573 nlp->svalue, in alignentries() 574 nlp->svalue + OFFSET_OF_CODE / HISTORICAL_SCALE_2); in alignentries() [all …]
|
H A D | printgprof.c | 699 register nltype *nlp; in printindex() local 723 nlp = namesortnlp[ j ]; in printindex() 724 if ( nlp -> printflag ) { in printindex() 725 sprintf( peterbuffer , "[%d]" , nlp -> index ); in printindex() 727 sprintf( peterbuffer , "(%d)" , nlp -> index ); in printindex() 730 printf( "%6.6s %-19.19s" , peterbuffer , nlp -> name ); in printindex() 733 sprintf( peterbuffer , "<cycle %d>" , nlp -> cycleno ); in printindex()
|
/freebsd/share/examples/sunrpc/dir/ |
H A D | dir_proc.c | 19 namelist *nlp; local 39 nlp = &res.readdir_res_u.list; 41 nl = *nlp = (namenode *) malloc(sizeof(namenode)); 44 nlp = &nl->next; 46 *nlp = NULL;
|
/freebsd/sys/compat/linux/ |
H A D | linux_netlink.c | 354 rtnl_newlink_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_newlink_to_linux() argument 389 rtnl_newaddr_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_newaddr_to_linux() argument 411 rtnl_newneigh_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_newneigh_to_linux() argument 432 rtnl_newroute_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_newroute_to_linux() argument 480 rtnl_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_writer *nw) in rtnl_to_linux() argument 488 return (rtnl_newlink_to_linux(hdr, nlp, nw)); in rtnl_to_linux() 491 return (rtnl_newaddr_to_linux(hdr, nlp, nw)); in rtnl_to_linux() 494 return (rtnl_newroute_to_linux(hdr, nlp, nw)); in rtnl_to_linux() 498 return (rtnl_newneigh_to_linux(hdr, nlp, nw)); in rtnl_to_linux() 507 nlmsg_error_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_writer *nw) in nlmsg_error_to_linux() argument [all …]
|
/freebsd/share/examples/ipfilter/samples/ |
H A D | proxy.c | 133 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/sys/netlink/route/ |
H A D | iface.c | 452 rtnl_handle_getlink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt) in rtnl_handle_getlink() argument 464 .so = nlp, in rtnl_handle_getlink() 475 NLP_LOG(LOG_DEBUG3, nlp, "fast track -> searching index %u", in rtnl_handle_getlink() 481 NLP_LOG(LOG_DEBUG3, nlp, "fast track -> searching name %s", in rtnl_handle_getlink() 533 rtnl_handle_dellink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt) in rtnl_handle_dellink() argument 548 NLP_LOG(LOG_DEBUG, nlp, "unable to find interface %u", attrs.ifi_index); in rtnl_handle_dellink() 551 NLP_LOG(LOG_DEBUG3, nlp, "mapped ifindex %u to %s", attrs.ifi_index, if_name(ifp)); in rtnl_handle_dellink() 557 NLP_LOG(LOG_DEBUG2, nlp, "deleting interface %s returned %d", if_name(ifp), error); in rtnl_handle_dellink() 589 struct nlattr_bmask *bm, struct nlpcb *nlp, struct nl_pstate *npt) in create_link() argument 614 struct nlattr_bmask *bm, struct nlpcb *nlp, struct nl_pstate *npt) in modify_link() argument [all …]
|
H A D | route_var.h | 40 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 D | rt.c | 351 struct nlpcb *nlp, struct nlmsghdr *hdr) in report_operation() argument 545 struct nlpcb *nlp; in dump_rtentry() 563 if (!rt_is_exportable(rt, nlp_get_cred(wa->nlp))) in dump_rtentry() 622 handle_rtm_getroute(struct nlpcb *nlp, struct nl_parsed_route *attrs, in handle_rtm_getroute() 659 if (!rt_is_exportable(rt, nlp_get_cred(nlp))) in handle_rtm_getroute() 676 handle_rtm_dump(struct nlpcb *nlp, uint32_t fibnum, int family, in handle_rtm_dump() 680 .nlp = nlp, in handle_rtm_dump() 937 rtnl_handle_newroute(struct nlmsghdr *hdr, struct nlpcb *nlp, in rtnl_handle_newroute() 986 report_operation(attrs.rta_table, &rc, nlp, hd in path_match_func() 533 struct nlpcb *nlp; global() member 610 handle_rtm_getroute(struct nlpcb * nlp,struct nl_parsed_route * attrs,struct nlmsghdr * hdr,struct nl_pstate * npt) handle_rtm_getroute() argument 664 handle_rtm_dump(struct nlpcb * nlp,uint32_t fibnum,int family,struct nlmsghdr * hdr,struct nl_writer * nw) handle_rtm_dump() argument 925 rtnl_handle_newroute(struct nlmsghdr * hdr,struct nlpcb * nlp,struct nl_pstate * npt) rtnl_handle_newroute() argument 993 rtnl_handle_delroute(struct nlmsghdr * hdr,struct nlpcb * nlp,struct nl_pstate * npt) rtnl_handle_delroute() argument 1023 rtnl_handle_getroute(struct nlmsghdr * hdr,struct nlpcb * nlp,struct nl_pstate * npt) rtnl_handle_getroute() argument [all...] |
H A D | iface_drivers.c | 72 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/contrib/libarchive/libarchive/test/ |
H A D | test_write_disk_mac_metadata.c | 67 char *nl, *nlp; in has_xattr() 88 for (nlp = nl; nlp < nl + r; nlp += strlen(nlp) + 1) { in has_xattr() 89 if (strcmp(nlp, xattrname) == 0) { in has_xattr() 68 char *nl, *nlp; has_xattr() local
|
H A D | test_write_disk_appledouble.c | 67 char *nl, *nlp; in has_xattr() 88 for (nlp = nl; nlp < nl + r; nlp += strlen(nlp) + 1) { in has_xattr() 89 if (strcmp(nlp, xattrname) == 0) { in has_xattr() 68 char *nl, *nlp; has_xattr() local
|
H A D | test_write_disk_no_hfs_compression.c | 37 char *nl, *nlp; in has_xattr() 58 for (nlp = nl; nlp < nl + r; nlp += strlen(nlp) + 1) { in has_xattr() 59 if (strcmp(nlp, xattrname) == 0) { in has_xattr() 38 char *nl, *nlp; has_xattr() local
|
H A D | test_write_disk_hfs_compression.c | 37 char *nl, *nlp; in has_xattr() 58 for (nlp = nl; nlp < nl + r; nlp += strlen(nlp) + 1) { in has_xattr() 59 if (strcmp(nlp, xattrname) == 0) { in has_xattr() 38 char *nl, *nlp; has_xattr() local
|
/freebsd/contrib/sendmail/src/ |
H A D | alias.c | 678 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/contrib/libpcap/ |
H A D | pcap-snit.c | 120 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()
|