Home
last modified time | relevance | path

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

12345678910>>...16

/netbsd-src/sys/net80211/
H A Dieee80211_crypto_wep.c135 hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); in wep_encap()
136 ivp = mtod(m, u_int8_t *) + hdrlen; in wep_encap()
211 wh = mtod(m, struct ieee80211_frame *); in wep_decap()
230 memmove(mtod(m, u_int8_t *) + wep.ic_header, mtod(m, void *), hdrlen); in wep_decap()
322 memcpy(rc4key, mtod(m, u_int8_t *) + hdrlen, IEEE80211_WEP_IVLEN); in wep_encrypt()
341 pos = mtod(m, uint8_t *) + off; in wep_encrypt()
359 ether_sprintf(mtod(m0, in wep_encrypt()
367 pos = mtod(m, uint8_t *); in wep_encrypt()
404 memcpy(rc4key, mtod(m, u_int8_t *) + hdrlen, IEEE80211_WEP_IVLEN); in wep_decrypt()
423 pos = mtod(m, uint8_t *) + off; in wep_decrypt()
[all …]
H A Dieee80211_crypto_tkip.c171 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in tkip_encap()
181 hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); in tkip_encap()
182 ivp = mtod(m, u_int8_t *) + hdrlen; in tkip_encap()
215 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in tkip_enmic()
256 wh = mtod(m, struct ieee80211_frame *); in tkip_decap()
257 ivp = mtod(m, uint8_t *) + hdrlen; in tkip_decap()
309 memmove(mtod(m, uint8_t *) + tkip.ic_header, mtod(m, void *), hdrlen); in tkip_decap()
325 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in tkip_demic()
601 pos = mtod(m, uint8_t *) + off; in wep_encrypt()
620 pos = mtod(m, uint8_t *); in wep_encrypt()
[all …]
H A Dieee80211_crypto_ccmp.c153 hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); in ccmp_encap()
154 ivp = mtod(m, u_int8_t *) + hdrlen; in ccmp_encap()
212 wh = mtod(m, struct ieee80211_frame *); in ccmp_decap()
213 ivp = mtod(m, uint8_t *) + hdrlen; in ccmp_decap()
248 memmove(mtod(m, u_int8_t *) + ccmp.ic_header, mtod(m, void *), hdrlen); in ccmp_decap()
371 wh = mtod(m, struct ieee80211_frame *); in ccmp_encrypt()
396 wh = mtod(m, struct ieee80211_frame *); in ccmp_decrypt()
H A Dieee80211_input.c168 wh = mtod(m, struct ieee80211_frame *); in ieee80211_input_data()
179 wh = mtod(m, struct ieee80211_frame *); in ieee80211_input_data()
284 wh = mtod(m, struct ieee80211_frame *); in ieee80211_input_data()
329 eh = mtod(m, struct ether_header *); in ieee80211_input_data()
395 wh = mtod(m, struct ieee80211_frame *); in ieee80211_input_management()
451 wh = mtod(m, struct ieee80211_frame *); in ieee80211_input_management()
484 wh = mtod(m, struct ieee80211_frame *); in ieee80211_input_control()
554 wh = mtod(m, struct ieee80211_frame *); in ieee80211_input()
680 qosf = mtod(m, struct ieee80211_qosframe *); in ieee80211_input()
762 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in ieee80211_defrag()
[all …]
/netbsd-src/sys/netipsec/
H A Dipsec_mbuf.c73 memcpy(mtod(mprev, char *) + mprev->m_len, in m_clone()
74 mtod(m, char *), m->m_len); in m_clone()
102 memcpy(mtod(mprev, char *) + mprev->m_len, in m_clone()
103 mtod(m, char *), m->m_len); in m_clone()
148 memcpy(mtod(n, char *), mtod(m, char *) + off, cc); in m_clone()
236 memcpy(n->m_data, mtod(m, char *) + skip + done, len); in m_makespace()
278 memmove(mtod(m, char *) + skip + hlen, in m_makespace()
279 mtod(m, char *) + skip, remain); in m_makespace()
422 memmove(mtod(m1, u_char *) + roff, in m_striphdr()
423 mtod(m1, u_char *) + roff + hlen, in m_striphdr()
H A Dipsec_output.c168 ip = mtod(m, struct ip *); in ipsec_process_done()
175 ip6 = mtod(m, struct ip6_hdr *); in ipsec_process_done()
197 udp = (struct udphdr *)(mtod(mo, char *) + roff); in ipsec_process_done()
210 ip = mtod(m, struct ip *); in ipsec_process_done()
228 ip6 = mtod(m, struct ip6_hdr *); in ipsec_process_done()
313 struct ip *ip = mtod(m, struct ip *); in ipsec_fill_saidx_bymbuf()
331 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); in ipsec_fill_saidx_bymbuf()
523 ip = mtod(m, struct ip *); in ipsec4_process_packet()
540 ip = mtod(m, struct ip *); in ipsec4_process_packet()
567 ip = mtod(m, struct ip *); in ipsec4_process_packet()
[all …]
/netbsd-src/sys/netinet/
H A Din_offload.c78 ip = (void *)(mtod(m, char *) + off); in tcp4_segment()
91 th = (void *)(mtod(m, char *) + off + iphlen); in tcp4_segment()
109 ip = (void *)(mtod(hdr, char *) + off); in tcp4_segment()
145 ip = (void *)(mtod(n, char *) + off); in tcp4_segment()
150 th = (void *)(mtod(n, char *) + off + iphlen); in tcp4_segment()
223 struct ip *ip = (struct ip *)(mtod(m, uint8_t *) + hdrlen); in in_undefer_cksum()
258 *(uint16_t *)(mtod(m, char *) + l4offset) = csum; in in_undefer_cksum()
281 ip = mtod(m, struct ip *); in in_undefer_cksum_tcpudp()
291 *(uint16_t *)(mtod(m, char *) + offset) = csum; in in_undefer_cksum_tcpudp()
H A Din_gif.c119 ip = mtod(m, const struct ip *); in in_gif_output()
134 ip6 = mtod(m, const struct ip6_hdr *); in in_gif_output()
173 bcopy(&iphdr, mtod(m, struct ip *), sizeof(struct ip)); in in_gif_output()
209 ip = mtod(m, const struct ip *); in in_gif_input()
254 xip = mtod(m, struct ip *); in in_gif_input()
272 ip6 = mtod(m, struct ip6_hdr *); in in_gif_input()
/netbsd-src/usr.sbin/npf/npftest/libnpftest/
H A Dnpf_mbuf_subr.c119 dst = mtod(m, void *); in mbuf_getwithdata()
133 ethdr = mtod(m0, struct ether_header *); in mbuf_construct_ether()
175 iphdr = mtod(m, struct ip *); in mbuf_construct()
203 ip6 = mtod(m, struct ip6_hdr *); in mbuf_construct6()
227 iphdr = mtod(mn, struct ip *); in mbuf_return_hdrs()
229 iphdr = mtod(m, struct ip *); in mbuf_return_hdrs()
238 struct ip6_hdr *ip6hdr = mtod(m, struct ip6_hdr *); in mbuf_return_hdrs6()
247 struct ip *iphdr = mtod(m, struct ip *); in mbuf_icmp_append()
254 memcpy(&ic->icmp_ip, mtod(m_orig, struct ip *), addlen); in mbuf_icmp_append()
/netbsd-src/sys/net/npf/
H A Dnpf_mbuf.c61 #define mtod(m,t) ((t)((nbuf)->nb_mops->getdata(m))) macro
94 nbuf->nb_nptr = mtod(m, void *); in nbuf_reset()
108 const unsigned off = (uintptr_t)nbuf->nb_nptr - mtod(m, uintptr_t); in nbuf_offset()
147 off = (uintptr_t)nbuf->nb_nptr - mtod(m, uintptr_t) + len; in nbuf_advance()
165 d = mtod(m, uint8_t *); in nbuf_advance()
190 const size_t off = (uintptr_t)nbuf->nb_nptr - mtod(n, uintptr_t); in nbuf_ensure_contig()
229 nbuf->nb_nptr = mtod(m, uint8_t *) + foff; in nbuf_ensure_contig()
244 const unsigned off = (uintptr_t)nbuf->nb_nptr - mtod(m, uintptr_t); in nbuf_ensure_writable()
264 nbuf->nb_nptr = mtod(m, uint8_t *) + off; in nbuf_ensure_writable()
/netbsd-src/sys/net/
H A Dif_arcsubr.c168 arph = mtod(m, struct arphdr *); in arc_output()
274 ah = mtod(m, struct arc_header *); in arc_output()
301 ah = mtod(m, struct arc_header *); in arc_output()
311 ah = mtod(m, struct arc_header *); in arc_output()
323 ah = mtod(m, struct arc_header *); in arc_output()
363 ah = mtod(m, struct arc_header *); in arc_defrag()
383 ah = mtod(m, struct arc_header *); in arc_defrag()
417 ah1 = mtod(m1, struct arc_header *); in arc_defrag()
518 ah = mtod(m, struct arc_header *); in arc_input()
544 mtod(m, struct arphdr *)->ar_pro = htons(ETHERTYPE_IP); in arc_input()
[all …]
H A Drss_config.c101 ip = mtod(m, struct ip *); in rss_toeplitz_hash_from_mbuf_ipv4()
117 th = (struct tcphdr *)(mtod(m, char *) + hlen); in rss_toeplitz_hash_from_mbuf_ipv4()
150 uh = (struct udphdr *)(mtod(m, char *) + hlen); in rss_toeplitz_hash_from_mbuf_ipv4()
202 ip6 = mtod(m, struct ip6_hdr *); in rss_toeplitz_hash_from_mbuf_ipv6()
215 th = (struct tcphdr *)(mtod(m, char *) + hlen); in rss_toeplitz_hash_from_mbuf_ipv6()
247 uh = (struct udphdr *)(mtod(m, char *) + hlen); in rss_toeplitz_hash_from_mbuf_ipv6()
H A Dppp-deflate.c241 rptr = mtod(mp, u_char *); in z_compress()
262 wptr = mtod(m, u_char *); in z_compress()
287 state->strm.avail_in = mtod(mp, u_char *) + mp->m_len - rptr; in z_compress()
301 state->strm.next_in = mtod(mp, u_char *); in z_compress()
317 state->strm.next_out = mtod(m, u_char *); in z_compress()
472 rptr = mtod(mi, u_char *); in z_decompress()
479 rptr = mtod(mi, u_char *); in z_decompress()
514 wptr = mtod(mo, u_char *); in z_decompress()
551 state->strm.next_in = mtod(mi, u_char *); in z_decompress()
579 state->strm.next_out = mtod(mo, u_char *); in z_decompress()
[all …]
H A Dbsd-comp.c477 m->m_len = wptr - mtod(m, u_char *); \ in bsd_compress()
484 wptr = mtod(m, u_char *); \ in bsd_compress()
507 rptr = mtod(mp, u_char *); in bsd_compress()
527 wptr = mtod(m, u_char *); in bsd_compress()
555 rptr = mtod(mp, u_char *); in bsd_compress()
631 m->m_len = wptr - mtod(m, u_char *); in bsd_compress()
686 rptr = mtod(dmsg, u_char *); in bsd_incomp()
700 rptr = mtod(dmsg, u_char *); in bsd_incomp()
815 rptr = mtod(cmp, u_char *); in bsd_decompress()
826 rptr = mtod(cmp, u_char *); in bsd_decompress()
[all …]
H A Dether_sw_offload.c100 ep = mtod(m, struct ether_header *); in ether_sw_offload_tx()
189 eh = mtod(m, struct ether_header *); in ether_sw_offload_rx()
211 ip = (void *)(mtod(m, char *) + ehlen); in ether_sw_offload_rx()
224 ip6 = (void *)(mtod(m, char *) + ehlen); in ether_sw_offload_rx()
299 th = (void *)(mtod(m, char *) + l4offset); in ether_sw_offload_rx()
323 uh = (void *)(mtod(m, char *) + l4offset); in ether_sw_offload_rx()
/netbsd-src/sys/nfs/
H A Dkrpc_subr.c159 sdata = mtod(m, struct sdata *); in krpc_portmap()
179 rdata = mtod(m, struct rdata *); in krpc_portmap()
199 reply = mtod(m, struct rpc_reply *); in krpccheck()
285 call = mtod(mhead, struct rpc_call *); in krpc_call()
321 reply = mtod(m, struct rpc_reply *); in krpc_call()
426 xs = mtod(m, struct xdr_string *); in xdr_string_encode()
446 xs = mtod(m, struct xdr_string *); in xdr_string_decode()
481 xi = mtod(m, struct xdr_inaddr *); in xdr_inaddr_encode()
507 xi = mtod(m, struct xdr_inaddr *); in xdr_inaddr_decode()
H A Dnfs_subs.c590 bpos = mtod(mb, void *); in nfsm_reqh()
628 bpos = mtod(mb, void *); in nfsm_rpchead()
677 bpos = mtod(mb, void *); in nfsm_rpchead()
712 bpos = mtod(mb, void *); in nfsm_rpchead()
751 len = mtod(mp, char *) + mp->m_len - mbufcp; in nfsm_mbuftouio()
766 mbufcp = mtod(mp, void *); in nfsm_mbuftouio()
847 cp = mtod(mp, char *) + mp->m_len; in nfsm_uiotombuf()
871 cp = mtod(mp, char *) + mp->m_len; in nfsm_uiotombuf()
877 *bpos = mtod(mp, char *) + mp->m_len; in nfsm_uiotombuf()
914 src = mtod(m1, void *); in nfsm_disct()
[all …]
/netbsd-src/sys/netinet6/
H A Din6_offload.c82 iph = (void *)(mtod(m, char *) + off); in tcp6_segment()
93 th = (void *)(mtod(m, char *) + off + iphlen); in tcp6_segment()
111 iph = (void *)(mtod(hdr, char *) + off); in tcp6_segment()
147 th = (void *)(mtod(n, char *) + off + iphlen); in tcp6_segment()
208 plen = *(uint16_t *)(mtod(m, char *) + ip6_plen_offset); in in6_undefer_cksum()
225 *(uint16_t *)(mtod(m, char *) + l4offset) = csum; in in6_undefer_cksum()
257 *(uint16_t *)(mtod(m, char *) + offset) = csum; in in6_undefer_cksum_tcpudp()
/netbsd-src/sys/netmpls/
H A Dmpls_ttl.c162 struct ip *oip = mtod(n, struct ip *), *nip; in mpls_icmp_error()
257 icp = mtod(m, struct icmp *); in mpls_icmp_error()
298 nip = mtod(m, struct ip *); in mpls_icmp_error()
325 iph = mtod(m, struct ip *); in ip4_check()
335 iph = mtod(m, struct ip *); in ip4_check()
372 mshim = mtod(m, union mpls_shim *); in mpls_ttl_dec()
397 bos_shim.s_addr = ntohl(mtod(m, union mpls_shim *)->s_addr); in mpls_ttl_dec()
/netbsd-src/sys/dev/bluetooth/
H A Dbth5.c516 rptr = mtod(m, uint8_t *); in bth5_slip_transmit()
567 rptr = mtod(m, uint8_t *); in bth5_slip_transmit()
740 mtod(m, uint8_t *)[m->m_len++] = in bth5_slip_receive()
744 mtod(m, uint8_t *)[m->m_len++] = in bth5_slip_receive()
748 mtod(m, uint8_t *)[m->m_len++] = in bth5_slip_receive()
751 mtod(m, uint8_t *)[m->m_len++] = in bth5_slip_receive()
761 mtod(m, uint8_t *)[m->m_len++] = c; in bth5_slip_receive()
788 bth5_hdr_t *hdrp = mtod(m, bth5_hdr_t *); in bth5_pktintegrity_transmit()
808 buf = mtod(_m, uint8_t *); in bth5_pktintegrity_transmit()
827 bth5_hdr_t *hdrp = mtod(m, bth5_hdr_t *); in bth5_pktintegrity_receive()
[all …]
H A Dbcsp.c514 rptr = mtod(m, uint8_t *); in bcsp_slip_transmit()
557 rptr = mtod(m, uint8_t *); in bcsp_slip_transmit()
704 mtod(m, uint8_t *)[m->m_len++] = in bcsp_slip_receive()
707 mtod(m, uint8_t *)[m->m_len++] = in bcsp_slip_receive()
717 mtod(m, uint8_t *)[m->m_len++] = c; in bcsp_slip_receive()
744 bcsp_hdr_t *hdrp = mtod(m, bcsp_hdr_t *); in bcsp_pktintegrity_transmit()
764 buf = mtod(_m, uint8_t *); in bcsp_pktintegrity_transmit()
783 bcsp_hdr_t *hdrp = mtod(m, bcsp_hdr_t *); in bcsp_pktintegrity_receive()
823 buf = mtod(m, uint8_t *); in bcsp_pktintegrity_receive()
903 hdrp = mtod(m, bcsp_hdr_t *); in bcsp_mux_transmit()
[all …]
/netbsd-src/sys/dev/pci/cxgb/
H A Dcxgb_lro.c83 struct ip *sih = (struct ip *)(mtod(m, uint8_t *) + IPH_OFFSET); in lro_match()
158 struct ip *ih = (struct ip *)(mtod(m, uint8_t *) + IPH_OFFSET); in lro_new_session_init()
177 struct ip *ih = (struct ip *)(mtod(sm, uint8_t *) + IPH_OFFSET); in lro_flush_session()
247 struct cpl_rx_pkt *cpl = (struct cpl_rx_pkt *)(mtod(sm, uint8_t *) + 2); in lro_update_session()
248 struct cpl_rx_pkt *ncpl = (struct cpl_rx_pkt *)(mtod(m, uint8_t *) + 2); in lro_update_session()
249 struct ip *nih = (struct ip *)(mtod(m, uint8_t *) + IPH_OFFSET); in lro_update_session()
265 th = (struct tcphdr *)(mtod(sm, uint8_t *) + IPH_OFFSET + sizeof (struct ip)); in lro_update_session()
328 struct cpl_rx_pkt *cpl = (struct cpl_rx_pkt *)(mtod(m, uint8_t *) + ethpad); in t3_rx_eth_lro()
/netbsd-src/sys/kern/
H A Duipc_mbuf.c809 memcpy(mtod(n, void *), mtod(m, char *) + off, in m_copy_internal()
813 memcpy(mtod(n, void *), mtod(m, char *) + off, in m_copy_internal()
864 memcpy(mtod(n, char *), mtod(m, char *), n->m_len); in m_copypacket()
882 memcpy(mtod(n, char *), mtod(m, char *), n->m_len); in m_copypacket()
922 memcpy(cp, mtod(m, char *) + off, count); in m_copydata()
949 memcpy(mtod( in m_cat()
[all...]
/netbsd-src/sys/fs/nfs/common/
H A Dkrpc_subr.c154 sdata = mtod(m, struct sdata *); in krpc_portmap()
174 rdata = mtod(m, struct rdata *); in krpc_portmap()
278 call = mtod(mhead, struct krpc_call *); in krpc_call()
360 reply = mtod(m, struct krpc_reply *); in krpc_call()
409 reply = mtod(m, struct krpc_reply *); in krpc_call()
459 xs = mtod(m, struct xdr_string *); in xdr_string_encode()
/netbsd-src/sys/compat/common/
H A Duipc_syscalls_43.c250 struct cmsghdr *cmsg = mtod(control, struct cmsghdr *); in compat_43_sys_recvmsg()
268 mtod(from, struct osockaddr *)->sa_family = in compat_43_sys_recvmsg()
269 mtod(from, struct sockaddr *)->sa_family; in compat_43_sys_recvmsg()
323 cmsg = mtod(ctl, struct cmsghdr *); in compat43_set_accrights()
371 sa = mtod(nam, struct sockaddr *); in compat_43_sys_sendmsg()
372 osa = mtod(nam, struct osockaddr *); in compat_43_sys_sendmsg()

12345678910>>...16