| /freebsd-13-stable/sys/netgraph/ |
| HD | ng_rfc1490.c | 319 ptr = start = mtod(m, const u_char *); in ng_rfc1490_rcvdata() 389 mtod(m, u_char *)[0] = HDLC_UI; in ng_rfc1490_rcvdata() 390 mtod(m, u_char *)[1] = NLPID_PPP; in ng_rfc1490_rcvdata() 398 mtod(m, u_char *)[0] = HDLC_UI; in ng_rfc1490_rcvdata() 399 mtod(m, u_char *)[1] = NLPID_IP; in ng_rfc1490_rcvdata() 410 mtod(m, u_char *)[0] = HDLC_UI; in ng_rfc1490_rcvdata() 411 mtod(m, u_char *)[1] = 0x00; /* PAD */ in ng_rfc1490_rcvdata() 412 mtod(m, u_char *)[2] = NLPID_SNAP; in ng_rfc1490_rcvdata() 413 bzero((char *)(mtod(m, u_char *) + 3), 3); /* OUI 0-0-0 */ in ng_rfc1490_rcvdata() 414 *((u_int16_t *)mtod(m, u_int16_t *) + 6/sizeof(u_int16_t)) in ng_rfc1490_rcvdata() [all …]
|
| /freebsd-13-stable/sys/net80211/ |
| HD | ieee80211_crypto_wep.c | 188 hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); in wep_encap() 189 wh = mtod(m, struct ieee80211_frame *); in wep_encap() 206 ivp = mtod(m, uint8_t *); in wep_encap() 259 wh = mtod(m, struct ieee80211_frame *); in wep_decap() 270 ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + wep.ic_header, hdrlen); in wep_decap() 362 memcpy(rc4key, mtod(m, uint8_t *) + hdrlen, IEEE80211_WEP_IVLEN); in wep_encrypt() 381 pos = mtod(m, uint8_t *) + off; in wep_encrypt() 397 ether_sprintf(mtod(m0, in wep_encrypt() 407 pos = mtod(m, uint8_t *); in wep_encrypt() 445 memcpy(rc4key, mtod(m, uint8_t *) + hdrlen, IEEE80211_WEP_IVLEN); in wep_decrypt() [all …]
|
| HD | ieee80211_crypto_ccmp.c | 172 hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); in ccmp_encap() 173 wh = mtod(m, const struct ieee80211_frame *); in ccmp_encap() 193 ivp = mtod(m, uint8_t *); in ccmp_encap() 251 wh = mtod(m, struct ieee80211_frame *); in ccmp_decap() 252 ivp = mtod(m, uint8_t *) + hdrlen; in ccmp_decap() 290 ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + ccmp.ic_header, in ccmp_decap() 460 wh = mtod(m, struct ieee80211_frame *); in ccmp_encrypt() 466 pos = mtod(m, uint8_t *) + hdrlen + ccmp.ic_header; in ccmp_encrypt() 512 pos_next = mtod(n, uint8_t *); in ccmp_encrypt() 541 pos_next = mtod(m, uint8_t *); in ccmp_encrypt() [all …]
|
| HD | ieee80211_crypto_tkip.c | 185 wh = mtod(m, struct ieee80211_frame *); in tkip_encap() 193 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in tkip_encap() 210 hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); in tkip_encap() 218 ivp = mtod(m, uint8_t *); in tkip_encap() 244 wh = mtod(m, struct ieee80211_frame *); in tkip_enmic() 256 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in tkip_enmic() 307 wh = mtod(m, struct ieee80211_frame *); in tkip_decap() 308 ivp = mtod(m, uint8_t *) + hdrlen; in tkip_decap() 364 memmove(mtod(m, uint8_t *) + tkip.ic_header, mtod(m, void *), in tkip_decap() 389 wh = mtod(m, struct ieee80211_frame *); in tkip_demic() [all …]
|
| HD | ieee80211_input.c | 175 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in ieee80211_defrag() 224 lwh = mtod(mfrag, struct ieee80211_frame *); in ieee80211_defrag() 266 wh = mtod(mfrag, struct ieee80211_frame *); in ieee80211_defrag() 277 struct ether_header *eh = mtod(m, struct ether_header *); in ieee80211_deliver_data() 329 memcpy(&wh, mtod(m, caddr_t), hdrlen); in ieee80211_decap() 330 llc = (struct llc *)(mtod(m, caddr_t) + hdrlen); in ieee80211_decap() 344 eh = mtod(m, struct ether_header *); in ieee80211_decap() 364 if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) { in ieee80211_decap() 371 eh = mtod(m, struct ether_header *); in ieee80211_decap() 401 eh = mtod(m, struct ether_header *); /* 802.3 header is first */ in ieee80211_decap1() [all …]
|
| /freebsd-13-stable/tools/regression/net80211/tkip/ |
| HD | test_tkip.c | 219 memcpy(mtod(m, void *), t->plaintext, len); in runtest() 222 hdrlen = ieee80211_anyhdrsize(mtod(m, void *)); in runtest() 236 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 240 if (memcmp(mtod(m, const void *), t->plaintext, t->plaintext_len)) { in runtest() 242 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 269 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 272 } else if (memcmp(mtod(m, const void *), t->encrypted, m->m_pkthdr.len)) { in runtest() 274 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 298 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 308 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() [all …]
|
| /freebsd-13-stable/tools/regression/net80211/wep/ |
| HD | test_wep.c | 220 memcpy(mtod(m, void *), t->encrypted, t->encrypted_len); in runtest() 223 hdrlen = ieee80211_anyhdrsize(mtod(m, void *)); in runtest() 230 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 239 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 242 } else if (memcmp(mtod(m, const void *), t->plaintext, t->plaintext_len)) { in runtest() 244 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 265 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 268 } else if (memcmp(mtod(m, const void *), t->encrypted, m->m_pkthdr.len)) { in runtest() 270 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest()
|
| /freebsd-13-stable/lib/libcuse/ |
| HD | cuse_lib.c | 76 const struct cuse_methods *mtod; member 365 cuse_dev_create(const struct cuse_methods *mtod, void *priv0, void *priv1, in cuse_dev_create() argument 382 cdev->mtod = mtod; in cuse_dev_create() 488 if (cdev->mtod->cm_open != NULL) in cuse_wait_and_process() 489 error = (cdev->mtod->cm_open) (cdev, (int)info.fflags); in cuse_wait_and_process() 523 if (cdev->mtod->cm_close != NULL) in cuse_wait_and_process() 524 error = (cdev->mtod->cm_close) (cdev, (int)info.fflags); in cuse_wait_and_process() 530 if (cdev->mtod->cm_read != NULL) { in cuse_wait_and_process() 531 error = (cdev->mtod->cm_read) (cdev, (int)info.fflags, in cuse_wait_and_process() 539 if (cdev->mtod->cm_write != NULL) { in cuse_wait_and_process() [all …]
|
| /freebsd-13-stable/sys/netipsec/ |
| HD | ipsec_mbuf.c | 86 bcopy(mtodo(m, hlen), mtod(m, caddr_t), skip); in m_makespace() 113 memcpy(n->m_data, mtod(m, char *) + skip + done, len); in m_makespace() 153 bcopy(mtod(m, caddr_t) + skip, in m_makespace() 154 mtod(m, caddr_t) + skip + hlen, remain); in m_makespace() 295 bcopy(mtod(m1, u_char *) + roff + hlen, in m_striphdr() 296 mtod(m1, u_char *) + roff, in m_striphdr() 318 addr = mtod(m, caddr_t) + roff; in m_checkalignment() 335 addr = m ? mtod(m, caddr_t) : NULL; in m_checkalignment() 338 printf(" [%p:%u]", mtod(m, caddr_t), m->m_len); in m_checkalignment()
|
| HD | ipsec_output.c | 138 ip = mtod(m, struct ip *); in ipsec4_allocsa() 219 ip = mtod(m, struct ip *); in ipsec4_perform_request() 256 ip = mtod(m, struct ip *); in ipsec4_perform_request() 331 ip = mtod(m, struct ip *); in ipsec4_common_output() 439 ip6 = mtod(m, struct ip6_hdr *); in ipsec6_allocsa() 518 ip6 = mtod(m, struct ip6_hdr *); in ipsec6_perform_request() 525 ip6 = mtod(m, struct ip6_hdr *); /* pfil can change mbuf */ in ipsec6_perform_request() 559 ip = mtod(m, struct ip *); in ipsec6_perform_request() 701 mtod(m, struct ip *)->ip_len = htons(m->m_pkthdr.len); in ipsec_process_done() 716 mtod(m, struct ip6_hdr *)->ip6_plen = in ipsec_process_done() [all …]
|
| /freebsd-13-stable/tools/regression/net80211/ccmp/ |
| HD | test_ccmp.c | 629 memcpy(mtod(m, void *), t->plaintext, t->plaintext_len); in runtest() 632 hdrlen = ieee80211_anyhdrsize(mtod(m, void *)); in runtest() 648 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 651 } else if (memcmp(mtod(m, const void *), t->encrypted, t->encrypted_len)) { in runtest() 654 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 666 cmpfail(mtod(m, const void *), m->m_len, in runtest() 676 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest() 679 } else if (memcmp(mtod(m, const void *), t->plaintext, t->plaintext_len)) { in runtest() 682 cmpfail(mtod(m, const void *), m->m_pkthdr.len, in runtest()
|
| /freebsd-13-stable/sys/netgraph/bluetooth/hci/ |
| HD | ng_hci_evnt.c | 97 hdr = mtod(event, ng_hci_event_pkt_t *); in ng_hci_process_event() 390 ep = mtod(event, ng_hci_le_advertising_report_ep *); in le_advertizing_report() 405 addr_type = *mtod(event, u_int8_t *); in le_advertizing_report() 439 length_data = *mtod(event, u_int8_t *); in le_advertizing_report() 459 n->page_scan_mode = *mtod(event, char *); in le_advertizing_report() 482 ep = mtod(event, ng_hci_le_connection_complete_ep *); in le_connection_complete() 588 lep = mtod(event, ng_hci_le_ep *); in le_event() 625 ep = mtod(event, ng_hci_inquiry_result_ep *); in inquiry_result() 650 n->page_scan_rep_mode = *mtod(event, u_int8_t *); in inquiry_result() 656 n->page_scan_mode = *mtod(event, u_int8_t *); in inquiry_result() [all …]
|
| HD | ng_hci_main.c | 727 switch (*mtod(m, u_int8_t *)) { in ng_hci_drv_rcvdata() 772 *mtod(m, u_int8_t *)); in ng_hci_drv_rcvdata() 801 if (*mtod(m, u_int8_t *) != NG_HCI_ACL_DATA_PKT) { in ng_hci_acl_rcvdata() 805 *mtod(m, u_int8_t *)); in ng_hci_acl_rcvdata() 828 mtod(m, ng_hci_acldata_pkt_t *)->con_handle)); in ng_hci_acl_rcvdata() 829 size = le16toh(mtod(m, ng_hci_acldata_pkt_t *)->length); in ng_hci_acl_rcvdata() 919 if (*mtod(m, u_int8_t *) != NG_HCI_SCO_DATA_PKT) { in ng_hci_sco_rcvdata() 923 *mtod(m, u_int8_t *)); in ng_hci_sco_rcvdata() 947 mtod(m, ng_hci_scodata_pkt_t *)->con_handle)); in ng_hci_sco_rcvdata() 948 size = mtod(m, ng_hci_scodata_pkt_t *)->length; in ng_hci_sco_rcvdata() [all …]
|
| /freebsd-13-stable/sys/netinet/ |
| HD | ip_options.c | 103 struct ip *ip = mtod(m, struct ip *); in ip_dooptions() 450 *(mtod(m, struct in_addr *)) = *p--; in ip_srcroute() 457 (void)memcpy(mtod(m, caddr_t) + sizeof(struct in_addr), in ip_srcroute() 459 q = (struct in_addr *)(mtod(m, caddr_t) + in ip_srcroute() 483 struct ip *ip = mtod(m, struct ip *); in ip_stripoptions() 507 struct ipoption *p = mtod(opt, struct ipoption *); in ip_insertoptions() 509 struct ip *ip = mtod(m, struct ip *); in ip_insertoptions() 534 bcopy(ip, mtod(m, void *), sizeof(struct ip)); in ip_insertoptions() 539 bcopy(ip, mtod(m, void *), sizeof(struct ip)); in ip_insertoptions() 541 ip = mtod(m, struct ip *); in ip_insertoptions() [all …]
|
| HD | ip_icmp.c | 240 oip = mtod(n, struct ip *); in icmp_error() 273 oip = mtod(n, struct ip *); in icmp_error() 285 oip = mtod(n, struct ip *); in icmp_error() 300 oip = mtod(n, struct ip *); in icmp_error() 313 oip = mtod(n, struct ip *); in icmp_error() 349 icp = mtod(m, struct icmp *); in icmp_error() 390 nip = mtod(m, struct ip *); in icmp_error() 417 struct ip *ip = mtod(m, struct ip *); in icmp_input() 452 ip = mtod(m, struct ip *); in icmp_input() 455 icp = mtod(m, struct icmp *); in icmp_input() [all …]
|
| /freebsd-13-stable/sys/netgraph/bluetooth/l2cap/ |
| HD | ng_l2cap_cmds.h | 64 c = mtod((_m), struct _cmd_rej *); \ 100 c = mtod((_m), struct _con_req *); \ 123 c = mtod((_m), struct _con_rsp *); \ 150 c = mtod((_m), struct _cfg_req *); \ 184 c = mtod((_m), struct _cfg_rsp *); \ 214 c = mtod((_m), struct _cmd_urs *); \ 232 p = mtod((_m), u_int8_t *); \ 310 c = mtod((_m), struct _discon_req *); \ 333 c = mtod((_m), struct _discon_rsp *); \ 353 c = mtod((_m), ng_l2cap_cmd_hdr_t *); \ [all …]
|
| /freebsd-13-stable/sys/kern/ |
| HD | uipc_mbuf.c | 542 bcopy(mtod(m, caddr_t)+off, mtod(n, caddr_t), in m_copym() 585 bcopy(mtod(m, char *), mtod(n, char *), n->m_len); in m_copypacket() 602 bcopy(mtod(m, char *), mtod(n, char *), n->m_len); in m_copypacket() 661 bcopy(mtod(m, caddr_t) + off, cp, count); in m_copydata() 763 bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len, in m_cat() 924 bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len, in m_pullup() 968 memcpy(mtod(m, caddr_t) + m->m_len, mtod(n, caddr_t), in m_copyup() 1069 bcopy(mtod(m, caddr_t) + len, mtod(n, caddr_t), remain); in m_split() 1132 copy(buf, mtod(m, caddr_t), (u_int)len); in m_devget() 1134 bcopy(buf, mtod(m, caddr_t), (u_int)len); in m_devget() [all …]
|
| HD | uipc_mbuf2.c | 211 m_copydata(n->m_next, 0, tlen, mtod(n, caddr_t) + n->m_len); in m_pulldown() 220 bcopy(mtod(n, caddr_t) + off, mtod(n->m_next, caddr_t), hlen); in m_pulldown() 241 bcopy(mtod(n, caddr_t) + off, mtod(o, caddr_t), hlen); in m_pulldown() 244 m_copydata(n->m_next, 0, tlen, mtod(o, caddr_t) + o->m_len); in m_pulldown() 297 m_copydata(m, off, len, mtod(n, caddr_t)); in m_dup1()
|
| /freebsd-13-stable/contrib/smbfs/lib/smb/ |
| HD | mbuf.c | 115 dp = mtod(nm, char *); in m_lineup() 144 mbp->mb_pos = mtod(m, char *); in mb_initm() 216 mbp->mb_pos = mtod(mn, char *); in mb_fit() 304 dst = mtod(m, char *) + m->m_len; in mb_put_mem() 314 mbp->mb_pos = mtod(m, char *) + m->m_len; in mb_put_mem() 329 mbp->mb_pos = mtod(m, char *) + m->m_len; in mb_put_mbuf() 350 #define mb_left(m,p) (mtod(m, char *) + (m)->m_len - (p)) 454 mbp->mb_pos = mtod(m, char *); in mb_get_mem()
|
| HD | rq.c | 108 dst = mtod(m, char *) + m->m_len; in smb_rq_dmem() 115 mbp->mb_pos = mtod(m, char *) + m->m_len; in smb_rq_dmem() 135 data = mtod(mbp->mb_top, char*); in smb_rq_simple() 144 krq.ioc_rpbuf = mtod(mbp->mb_top, char *); in smb_rq_simple()
|
| /freebsd-13-stable/sys/netinet6/ |
| HD | icmp6.c | 237 ip6 = mtod(m, struct ip6_hdr *); in icmp6_error2() 279 oip6 = mtod(m, struct ip6_hdr *); in icmp6_error() 323 oip6 = mtod(m, struct ip6_hdr *); in icmp6_error() 324 icp = (struct icmp6_hdr *)(mtod(m, caddr_t) + off); in icmp6_error() 360 nip6 = mtod(m, struct ip6_hdr *); in icmp6_error() 424 ip6 = mtod(m, struct ip6_hdr *); in icmp6_input() 557 nip6 = mtod(n, struct ip6_hdr *); in icmp6_input() 580 nicmp6 = (struct icmp6_hdr *)(mtod(n, caddr_t) + off); in icmp6_input() 695 nip6 = mtod(n, struct ip6_hdr *); in icmp6_input() 913 icmp6 = (struct icmp6_hdr *)(mtod(m, caddr_t) + off); in icmp6_notify_error() [all …]
|
| HD | dest6.c | 82 dstopts = (struct ip6_dest *)(mtod(m, caddr_t) + off); in dest6_input() 93 dstopts = (struct ip6_dest *)(mtod(m, caddr_t) + off); in dest6_input() 115 opt - mtod(m, u_int8_t *)); in dest6_input()
|
| /freebsd-13-stable/sys/rpc/ |
| HD | rpcm_subs.h | 90 bpos = mtod(mb, caddr_t); \ 97 { t1 = mtod(md, caddr_t)+md->m_len-dpos; \ 120 { t1 = mtod(md, caddr_t)+md->m_len-dpos; \
|
| /freebsd-13-stable/sys/netgraph/netflow/ |
| HD | ng_netflow.c | 697 eh = mtod(m, struct ether_header *); in ng_netflow_rcvdata() 705 eh = mtod(m, struct ether_header *); in ng_netflow_rcvdata() 718 eh = mtod(m, struct ether_header *); in ng_netflow_rcvdata() 729 evh = mtod(m, struct ether_vlan_header *); in ng_netflow_rcvdata() 754 ip = mtod(m, struct ip *); in ng_netflow_rcvdata() 764 ip6 = mtod(m, struct ip6_hdr *); in ng_netflow_rcvdata() 858 ip6e = (struct ip6_ext *)(mtod(m, caddr_t) + in ng_netflow_rcvdata() 867 ip6e = (struct ip6_ext *)(mtod(m, caddr_t) + in ng_netflow_rcvdata() 875 ip6f = (struct ip6_frag *)(mtod(m, caddr_t) + in ng_netflow_rcvdata() 910 ip = (struct ip *)(mtod(m, caddr_t) + l3_off); in ng_netflow_rcvdata() [all …]
|
| /freebsd-13-stable/sys/net/ |
| HD | if_fwsubr.c | 178 ah = mtod(m, struct arphdr *); in firewire_output() 261 enc = mtod(m, union fw_encap *); in firewire_output() 303 enc = mtod(m, union fw_encap *); in firewire_output() 363 enc = mtod(m, union fw_encap *); in firewire_input_fragment() 392 enc = mtod(mf, union fw_encap *); in firewire_input_fragment() 420 enc = mtod(mf, union fw_encap *); in firewire_input_fragment() 444 enc = mtod(mprev, union fw_encap *); in firewire_input_fragment() 485 enc = mtod(m, union fw_encap *); in firewire_input_fragment() 537 enc = mtod(m, union fw_encap *); in firewire_input() 548 enc = mtod(m, union fw_encap *); in firewire_input() [all …]
|