Home
last modified time | relevance | path

Searched refs:mtod (Results 1 – 25 of 400) sorted by relevance

12345678910>>...16

/freebsd/sys/netgraph/
H A Dng_rfc1490.c319 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 …]
H A Dng_l2tp.c792 hdr = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1]; in ng_l2tp_rcvdata_lower()
821 len = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1] - 4; in ng_l2tp_rcvdata_lower()
839 tid = (mtod(m, u_int8_t *)[0] << 8) + mtod(m, u_int8_t *)[1]; in ng_l2tp_rcvdata_lower()
840 sid = (mtod(m, u_int8_t *)[2] << 8) + mtod(m, u_int8_t *)[3]; in ng_l2tp_rcvdata_lower()
871 ns = (mtod(m, u_int8_t *)[0] << 8) + mtod(m, u_int8_t *)[1]; in ng_l2tp_rcvdata_lower()
872 nr = (mtod(m, u_int8_t *)[2] << 8) + mtod(m, u_int8_t *)[3]; in ng_l2tp_rcvdata_lower()
887 offset = (mtod(m, u_int8_t *)[0] << 8) + mtod(m, u_int8_t *)[1]; in ng_l2tp_rcvdata_lower()
940 mtod(m, u_int8_t *)[0] = sid >> 8; in ng_l2tp_rcvdata_lower()
941 mtod(m, u_int8_t *)[1] = sid & 0xff; in ng_l2tp_rcvdata_lower()
1123 p = mtod(m, uint8_t *); in ng_l2tp_rcvdata()
[all …]
/freebsd/sys/net80211/
H A Dieee80211_crypto_wep.c188 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 …]
H A Dieee80211_crypto_ccmp.c172 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()
252 wh = mtod(m, struct ieee80211_frame *); in ccmp_decap()
253 ivp = mtod(m, uint8_t *) + hdrlen; in ccmp_decap()
293 ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + ccmp.ic_header, in ccmp_decap()
467 wh = mtod(m, struct ieee80211_frame *); in ccmp_encrypt()
473 pos = mtod(m, uint8_t *) + hdrlen + ccmp.ic_header; in ccmp_encrypt()
519 pos_next = mtod(n, uint8_t *); in ccmp_encrypt()
548 pos_next = mtod(m, uint8_t *); in ccmp_encrypt()
[all …]
H A Dieee80211_crypto_tkip.c185 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 …]
H A Dieee80211_input.c176 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in ieee80211_defrag()
225 lwh = mtod(mfrag, struct ieee80211_frame *); in ieee80211_defrag()
267 wh = mtod(mfrag, struct ieee80211_frame *); in ieee80211_defrag()
278 struct ether_header *eh = mtod(m, struct ether_header *); in ieee80211_deliver_data()
330 memcpy(&wh, mtod(m, caddr_t), hdrlen); in ieee80211_decap()
331 llc = (struct llc *)(mtod(m, caddr_t) + hdrlen); in ieee80211_decap()
345 eh = mtod(m, struct ether_header *); in ieee80211_decap()
365 if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) { in ieee80211_decap()
372 eh = mtod(m, struct ether_header *); in ieee80211_decap()
402 eh = mtod(m, struct ether_header *); /* 802.3 header is first */ in ieee80211_decap1()
[all …]
H A Dieee80211_crypto_gcmp.c228 hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); in gcmp_encap()
229 wh = mtod(m, const struct ieee80211_frame *); in gcmp_encap()
249 ivp = mtod(m, uint8_t *); in gcmp_encap()
307 wh = mtod(m, struct ieee80211_frame *); in gcmp_decap()
308 ivp = mtod(m, uint8_t *) + hdrlen; in gcmp_decap()
349 ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + in gcmp_decap()
515 wh = mtod(m, struct ieee80211_frame *); in gcmp_encrypt()
609 wh = mtod(m, struct ieee80211_frame *); in gcmp_decrypt()
/freebsd/tools/regression/net80211/tkip/
H A Dtest_tkip.c219 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/lib/libcuse/
H A Dcuse_lib.c76 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/tools/regression/net80211/wep/
H A Dtest_wep.c220 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/tools/regression/net80211/ccmp/
H A Dtest_ccmp.c629 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/sys/netipsec/
H A Dipsec_mbuf.c86 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()
H A Dudpencap.c151 ip = mtod(m, struct ip *); in udp_ipsec_input()
164 ip6 = mtod(m, struct ip6_hdr *); in udp_ipsec_input()
255 ip = mtod(m, struct ip *); in udp_ipsec_output()
287 ip = mtod(m, struct ip *); in udp_ipsec_output()
297 ip6 = mtod(m, struct ip6_hdr *); in udp_ipsec_output()
373 ip = mtod(m, struct ip *); in udp_ipsec_adjust_cksum()
390 ip6 = mtod(m, struct ip6_hdr *); in udp_ipsec_adjust_cksum()
/freebsd/sys/netgraph/bluetooth/hci/
H A Dng_hci_evnt.c97 hdr = mtod(event, ng_hci_event_pkt_t *); in ng_hci_process_event()
392 ep = mtod(event, ng_hci_le_advertising_report_ep *); in le_advertizing_report()
407 addr_type = *mtod(event, u_int8_t *); in le_advertizing_report()
441 length_data = *mtod(event, u_int8_t *); in le_advertizing_report()
461 n->page_scan_mode = *mtod(event, char *); in le_advertizing_report()
484 ep = mtod(event, ng_hci_le_connection_complete_ep *); in le_connection_complete()
590 lep = mtod(event, ng_hci_le_ep *); in le_event()
627 ep = mtod(event, ng_hci_inquiry_result_ep *); in inquiry_result()
652 n->page_scan_rep_mode = *mtod(event, u_int8_t *); in inquiry_result()
658 n->page_scan_mode = *mtod(even in inquiry_result()
[all...]
H A Dng_hci_main.c727 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/sys/netinet/
H A Dip_options.c103 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()
536 bcopy(ip, mtod(m, void *), sizeof(struct ip)); in ip_insertoptions()
541 bcopy(ip, mtod(m, void *), sizeof(struct ip)); in ip_insertoptions()
543 ip = mtod(m, struct ip *); in ip_insertoptions()
[all …]
H A Dip_icmp.c237 oip = mtod(n, struct ip *); in icmp_error()
270 oip = mtod(n, struct ip *); in icmp_error()
282 oip = mtod(n, struct ip *); in icmp_error()
297 oip = mtod(n, struct ip *); in icmp_error()
310 oip = mtod(n, struct ip *); in icmp_error()
346 icp = mtod(m, struct icmp *); in icmp_error()
387 nip = mtod(m, struct ip *); in icmp_error()
463 struct ip *ip = mtod(m, struct ip *); in icmp_input()
497 ip = mtod(m, struct ip *); in icmp_input()
500 icp = mtod(m, struct icmp *); in icmp_input()
[all …]
/freebsd/sys/netgraph/bluetooth/l2cap/
H A Dng_l2cap_cmds.h64 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/sys/kern/
H A Duipc_mbuf.c579 bcopy(mtod(m, caddr_t)+off, mtod(n, caddr_t), in m_copym()
622 bcopy(mtod(m, char *), mtod(n, char *), n->m_len); in m_copypacket()
639 bcopy(mtod(m, char *), mtod(n, char *), n->m_len); in m_copypacket()
698 bcopy(mtod(m, caddr_t) + off, cp, count); in m_copydata()
800 bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len, in m_cat()
961 bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len, in m_pullup()
1005 memcpy(mtod(m, caddr_t) + m->m_len, mtod(n, caddr_t), in m_copyup()
1106 bcopy(mtod(m, caddr_t) + len, mtod(n, caddr_t), remain); in m_split()
1154 bcopy(mtod(m, char *) + len, mtod(n, char *), remain); in mc_split()
1235 copy(buf, mtod(m, caddr_t), (u_int)len); in m_devget()
[all …]
H A Duipc_mbuf2.c209 m_copydata(n->m_next, 0, tlen, mtod(n, caddr_t) + n->m_len); in m_pulldown()
218 bcopy(mtod(n, caddr_t) + off, mtod(n->m_next, caddr_t), hlen); in m_pulldown()
239 bcopy(mtod(n, caddr_t) + off, mtod(o, caddr_t), hlen); in m_pulldown()
242 m_copydata(n->m_next, 0, tlen, mtod(o, caddr_t) + o->m_len); in m_pulldown()
295 m_copydata(m, off, len, mtod(n, caddr_t)); in m_dup1()
/freebsd/contrib/smbfs/lib/smb/
H A Dmbuf.c112 dp = mtod(nm, char *); in m_lineup()
141 mbp->mb_pos = mtod(m, char *); in mb_initm()
213 mbp->mb_pos = mtod(mn, char *); in mb_fit()
301 dst = mtod(m, char *) + m->m_len; in mb_put_mem()
311 mbp->mb_pos = mtod(m, char *) + m->m_len; in mb_put_mem()
326 mbp->mb_pos = mtod(m, char *) + m->m_len; in mb_put_mbuf()
347 #define mb_left(m,p) (mtod(m, char *) + (m)->m_len - (p))
451 mbp->mb_pos = mtod(m, char *); in mb_get_mem()
/freebsd/sys/netinet6/
H A Dicmp6.c253 ip6 = mtod(m, struct ip6_hdr *); in icmp6_error2()
295 oip6 = mtod(m, struct ip6_hdr *); in icmp6_error()
339 oip6 = mtod(m, struct ip6_hdr *); in icmp6_error()
340 icp = (struct icmp6_hdr *)(mtod(m, caddr_t) + off); in icmp6_error()
376 nip6 = mtod(m, struct ip6_hdr *); in icmp6_error()
484 ip6 = mtod(m, struct ip6_hdr *); in icmp6_input()
588 nip6 = mtod(n, struct ip6_hdr *); in icmp6_input()
611 nicmp6 = (struct icmp6_hdr *)(mtod(n, caddr_t) + off); in icmp6_input()
726 nip6 = mtod(n, struct ip6_hdr *); in icmp6_input()
943 icmp6 = (struct icmp6_hdr *)(mtod(m, caddr_t) + off); in icmp6_notify_error()
[all …]
H A Ddest6.c82 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/sys/net/
H A Dif_fwsubr.c179 ah = mtod(m, struct arphdr *); in firewire_output()
262 enc = mtod(m, union fw_encap *); in firewire_output()
304 enc = mtod(m, union fw_encap *); in firewire_output()
364 enc = mtod(m, union fw_encap *); in firewire_input_fragment()
393 enc = mtod(mf, union fw_encap *); in firewire_input_fragment()
421 enc = mtod(mf, union fw_encap *); in firewire_input_fragment()
445 enc = mtod(mprev, union fw_encap *); in firewire_input_fragment()
486 enc = mtod(m, union fw_encap *); in firewire_input_fragment()
538 enc = mtod(m, union fw_encap *); in firewire_input()
549 enc = mtod(m, union fw_encap *); in firewire_input()
[all …]
/freebsd/sys/rpc/
H A Drpcm_subs.h88 bpos = mtod(mb, caddr_t); \
95 { t1 = mtod(md, caddr_t)+md->m_len-dpos; \
118 { t1 = mtod(md, caddr_t)+md->m_len-dpos; \

12345678910>>...16