Home
last modified time | relevance | path

Searched refs:hlen (Results 1 – 25 of 159) sorted by relevance

1234567

/freebsd-10-stable/contrib/tcpdump/
Dprint-mobility.c175 int mhlen, hlen, type; in mobility_print() local
207 hlen = IP6M_MINLEN; in mobility_print()
213 hlen = IP6M_MINLEN; in mobility_print()
215 TCHECK2(*mh, hlen + 8); in mobility_print()
218 EXTRACT_32BITS(&bp[hlen]), in mobility_print()
219 EXTRACT_32BITS(&bp[hlen + 4])); in mobility_print()
221 hlen += 8; in mobility_print()
229 hlen = IP6M_MINLEN; in mobility_print()
231 TCHECK2(*mh, hlen + 8); in mobility_print()
234 EXTRACT_32BITS(&bp[hlen]), in mobility_print()
[all …]
Dprint-tcp.c143 register u_int hlen; in tcp_print() local
172 hlen = TH_OFF(tp) * 4; in tcp_print()
180 if (!qflag && hlen >= sizeof(*tp) && hlen <= length && in tcp_print()
181 (length - hlen) >= 4) { in tcp_print()
187 fraglenp = (u_char *)tp + hlen; in tcp_print()
190 if (fraglen > (length - hlen) - 4) in tcp_print()
191 fraglen = (length - hlen) - 4; in tcp_print()
237 if (hlen < sizeof(*tp)) { in tcp_print()
239 length - hlen, hlen, (unsigned long)sizeof(*tp)); in tcp_print()
251 (void)printf("tcp %d", length - hlen); in tcp_print()
[all …]
Dprint-sl.c119 u_int hlen; in sliplink_print() local
147 hlen = IP_HL(ip); in sliplink_print()
148 hlen += TH_OFF((struct tcphdr *)&((int *)ip)[hlen]); in sliplink_print()
149 lastlen[dir][lastconn] = length - (hlen << 2); in sliplink_print()
197 register u_int flags, hlen; in compressed_sl_print() local
237 hlen = IP_HL(ip); in compressed_sl_print()
238 hlen += TH_OFF((struct tcphdr *)&((int32_t *)ip)[hlen]); in compressed_sl_print()
239 lastlen[dir][lastconn] = length - (hlen << 2); in compressed_sl_print()
Dprint-dccp.c177 u_int hlen; in dccp_print() local
203 hlen = dh->dccph_doff * 4; in dccp_print()
220 (void)printf(" %d", len - hlen); in dccp_print()
221 if (hlen > len) { in dccp_print()
223 hlen, len); in dccp_print()
323 if (hlen > dccp_basic_hdr_len(dh) + extlen){ in dccp_print()
329 hlen -= dccp_basic_hdr_len(dh) + extlen; in dccp_print()
334 if (hlen <= optlen) break; in dccp_print()
335 hlen -= optlen; in dccp_print()
/freebsd-10-stable/sys/net/
Dslcompress.c162 register u_int hlen = ip->ip_hl; local
179 th = (struct tcphdr *)&((int32_t *)ip)[hlen];
228 hlen += th->th_off;
229 hlen <<= 2;
230 if (hlen > m->m_len)
258 oth = (struct tcphdr *)&((int32_t *)&cs->cs_ip)[hlen];
259 deltaS = hlen;
260 hlen += th->th_off;
261 hlen <<= 2;
262 if (hlen > m->m_len)
[all …]
Dif_me.c435 int hlen; in me_input() local
443 hlen = sizeof(struct mobhdr); in me_input()
444 if (m->m_pkthdr.len < sizeof(struct ip) + hlen) in me_input()
445 hlen -= sizeof(struct in_addr); in me_input()
446 if (m->m_len < sizeof(struct ip) + hlen) in me_input()
447 m = m_pullup(m, sizeof(struct ip) + hlen); in me_input()
457 if (hlen != sizeof(struct mobhdr)) { in me_input()
462 hlen = sizeof(struct mobhdr) - sizeof(struct in_addr); in me_input()
464 if (me_in_cksum((uint16_t *)mh, hlen / sizeof(uint16_t)) != 0) { in me_input()
475 ip->ip_len = htons(m->m_pkthdr.len - hlen); in me_input()
[all …]
/freebsd-10-stable/sys/netipsec/
Dipsec_mbuf.c53 m_makespace(struct mbuf *m0, int skip, int hlen, int *off) in m_makespace() argument
59 IPSEC_ASSERT(hlen < MHLEN, ("hlen too big: %u", hlen)); in m_makespace()
74 if (hlen > M_TRAILINGSPACE(m)) { in m_makespace()
106 if (hlen <= M_TRAILINGSPACE(m) + remain) { in m_makespace()
107 m->m_len = skip + hlen; in m_makespace()
129 n->m_len = hlen; in m_makespace()
142 mtod(m, caddr_t) + skip + hlen, remain); in m_makespace()
143 m->m_len += hlen; in m_makespace()
146 m0->m_pkthdr.len += hlen; /* adjust packet length */ in m_makespace()
228 m_striphdr(struct mbuf *m, int skip, int hlen) in m_striphdr() argument
[all …]
Dxform_esp.c273 int plen, alen, hlen; in esp_input() local
300 hlen = sizeof (struct esp) + sav->ivlen; in esp_input()
302 hlen = sizeof (struct newesp) + sav->ivlen; in esp_input()
326 plen = m->m_pkthdr.len - (skip + hlen + alen); in esp_input()
350 ESPSTAT_ADD(esps_ibytes, m->m_pkthdr.len - (skip + hlen + alen)); in esp_input()
436 crde->crd_skip = skip + hlen; in esp_input()
437 crde->crd_len = m->m_pkthdr.len - (skip + hlen + alen); in esp_input()
438 crde->crd_inject = skip + hlen - sav->ivlen; in esp_input()
459 int hlen, skip, protoff, error, alen; in esp_input_cb() local
585 hlen = sizeof (struct esp) + sav->ivlen; in esp_input_cb()
[all …]
/freebsd-10-stable/usr.sbin/ppp/
Dslcompress.c164 register u_int hlen = ip->ip_hl; in sl_compress_tcp() local
183 th = (struct tcphdr *) & ((int *) ip)[hlen]; in sl_compress_tcp()
235 hlen += th->th_off; in sl_compress_tcp()
236 hlen <<= 2; in sl_compress_tcp()
237 if (hlen > m->m_len) in sl_compress_tcp()
265 oth = (struct tcphdr *) & ((int *) &cs->cs_ip)[hlen]; in sl_compress_tcp()
266 deltaS = hlen; in sl_compress_tcp()
267 hlen += th->th_off; in sl_compress_tcp()
268 hlen <<= 2; in sl_compress_tcp()
269 if (hlen > m->m_len) in sl_compress_tcp()
[all …]
Dtcpmss.c101 size_t hlen, olen, optlen; in MSSFixup() local
106 hlen = tc->th_off << 2; in MSSFixup()
109 if (hlen <= sizeof(struct tcphdr) || hlen > pktlen) in MSSFixup()
116 for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); in MSSFixup()
147 size_t hlen, plen; in tcpmss_Check() local
155 hlen = pip->ip_hl << 2; in tcpmss_Check()
162 ntohs(pip->ip_len) == plen && hlen <= plen && in tcpmss_Check()
163 plen >= sizeof(struct tcphdr) + hlen) in tcpmss_Check()
164 MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen, in tcpmss_Check()
/freebsd-10-stable/contrib/ipfilter/ipsend/
Dip.c166 int i, sent = 0, ts, hlen, olen; local
168 hlen = IP_HL(ip) << 2;
169 if (mtu < (hlen + 8)) {
171 mtu, hlen);
206 s = (char *)ip + hlen;
207 iplen = ntohs(ip->ip_len) - hlen;
212 if ((sent + (mtu - hlen)) >= iplen)
218 ts = (mtu - hlen);
221 ts += hlen;
224 ip->ip_sum = chksum((u_short *)ip, hlen);
[all …]
/freebsd-10-stable/sys/netgraph/
Dng_checksum.c312 int hlen, plen; in checksum_ipv4() local
323 hlen = ip4->ip_hl << 2; in checksum_ipv4()
326 if (hlen < sizeof(struct ip) || m->m_pkthdr.len < l3_offset + plen) in checksum_ipv4()
333 if (hlen == sizeof(struct ip)) in checksum_ipv4()
336 ip4->ip_sum = in_cksum_skip(m, l3_offset + hlen, l3_offset); in checksum_ipv4()
344 pullup_len = l3_offset + hlen; in checksum_ipv4()
359 th = (struct tcphdr *) mtodo(m, l3_offset + hlen); in checksum_ipv4()
362 ip4->ip_dst.s_addr, htons(ip4->ip_p + plen - hlen)); in checksum_ipv4()
365 th->th_sum = in_cksum_skip(m, l3_offset + plen, l3_offset + hlen); in checksum_ipv4()
380 uh = (struct udphdr *) mtodo(m, l3_offset + hlen); in checksum_ipv4()
[all …]
/freebsd-10-stable/sys/contrib/ipfilter/netinet/
Dip_fil_freebsd.c106 int (*ipf_checkp) __P((void *, ip_t *ip, int hlen, void *ifp, int out, mb_t **mp));
348 int tlen = 0, hlen; local
367 hlen = (fin->fin_v == 6) ? sizeof(ip6_t) : sizeof(ip_t);
369 hlen = sizeof(ip_t);
378 if (sizeof(*tcp2) + hlen > MLEN) {
386 m->m_len = sizeof(*tcp2) + hlen;
393 bzero((char *)ip, hlen);
397 tcp2 = (struct tcphdr *)((char *)ip + hlen);
435 tcp2->th_sum = in_cksum(m, hlen + sizeof(*tcp2));
436 ip->ip_len = htons(hlen + sizeof(*tcp2));
[all …]
/freebsd-10-stable/sys/kern/
Duipc_mbuf2.c98 int hlen, tlen, olen; in m_pulldown() local
192 hlen = n->m_len - off; in m_pulldown()
193 tlen = len - hlen; in m_pulldown()
202 if (hlen + olen < len) { in m_pulldown()
218 if ((off == 0 || offp) && M_LEADINGSPACE(n->m_next) >= hlen in m_pulldown()
220 n->m_next->m_data -= hlen; in m_pulldown()
221 n->m_next->m_len += hlen; in m_pulldown()
222 bcopy(mtod(n, caddr_t) + off, mtod(n->m_next, caddr_t), hlen); in m_pulldown()
223 n->m_len -= hlen; in m_pulldown()
242 o->m_len = hlen; in m_pulldown()
[all …]
/freebsd-10-stable/contrib/wpa/src/tls/
Dtlsv1_client_write.c433 size_t rlen, hlen, clen; in tls_write_client_certificate_verify() local
476 hlen = SHA256_MAC_LEN; in tls_write_client_certificate_verify()
478 crypto_hash_finish(conn->verify.sha256_cert, hpos, &hlen) < in tls_write_client_certificate_verify()
501 os_memmove(hash + 19, hash, hlen); in tls_write_client_certificate_verify()
502 hlen += 19; in tls_write_client_certificate_verify()
509 hlen = MD5_MAC_LEN; in tls_write_client_certificate_verify()
511 crypto_hash_finish(conn->verify.md5_cert, hpos, &hlen) < 0) in tls_write_client_certificate_verify()
525 hlen = SHA1_MAC_LEN; in tls_write_client_certificate_verify()
527 crypto_hash_finish(conn->verify.sha1_cert, hpos, &hlen) < 0) { in tls_write_client_certificate_verify()
536 hlen += MD5_MAC_LEN; in tls_write_client_certificate_verify()
[all …]
/freebsd-10-stable/sys/netinet/libalias/
Dalias_ftp.c229 int hlen, tlen, dlen, pflags; in AliasHandleFtpOut() local
236 hlen = (pip->ip_hl + tc->th_off) << 2; in AliasHandleFtpOut()
238 dlen = tlen - hlen; in AliasHandleFtpOut()
242 sptr += hlen; in AliasHandleFtpOut()
294 int hlen, tlen, dlen, pflags; in AliasHandleFtpIn() local
300 hlen = (pip->ip_hl + tc->th_off) << 2; in AliasHandleFtpIn()
302 dlen = tlen - hlen; in AliasHandleFtpIn()
306 sptr += hlen; in AliasHandleFtpIn()
666 int slen, hlen, tlen, dlen; in NewFtpMessage() local
676 hlen = (pip->ip_hl + tc->th_off) << 2; in NewFtpMessage()
[all …]
/freebsd-10-stable/lib/libstand/
Dudp.c144 size_t hlen; local
191 hlen = ip->ip_hl << 2;
192 if (hlen < sizeof(*ip) ||
193 in_cksum(ip, hlen) != 0) {
219 if (hlen != sizeof(*ip)) {
220 bcopy(((u_char *)ip) + hlen, uh, len - hlen);
222 n -= hlen - sizeof(*ip);
/freebsd-10-stable/sys/netinet/
Dip_output.c125 int hlen = sizeof (struct ip); in ip_output() local
167 hlen = len; /* ip->ip_hl is updated above */ in ip_output()
186 ip->ip_hl = hlen >> 2; in ip_output()
191 hlen = ip->ip_hl << 2; in ip_output()
383 ip_mloopback(ifp, m, dst, hlen); in ip_output()
504 hlen = ip->ip_hl << 2; in ip_output()
610 ip->ip_sum = in_cksum(m, hlen); in ip_output()
706 int hlen = ip->ip_hl << 2; in ip_fragment() local
707 int len = (mtu - hlen) & ~7; /* size of payload in each fragment */ in ip_fragment()
739 sctp_delayed_cksum(m0, hlen); in ip_fragment()
[all …]
/freebsd-10-stable/sys/netpfil/ipfw/
Dip_fw2.c576 send_reject6(struct ip_fw_args *args, int code, u_int hlen, struct ip6_hdr *ip6) in send_reject6() argument
583 tcp = (struct tcphdr *)((char *)ip6 + hlen); in send_reject6()
915 u_int hlen = 0; /* hlen >0 means we have an IP pkt */ in ipfw_chk() local
1019 hlen = sizeof(struct ip6_hdr); in ipfw_chk()
1026 PULLUP_TO(hlen, ulp, struct icmp6_hdr); in ipfw_chk()
1031 PULLUP_TO(hlen, ulp, struct tcphdr); in ipfw_chk()
1039 PULLUP_TO(hlen, ulp, struct sctphdr); in ipfw_chk()
1045 PULLUP_TO(hlen, ulp, struct udphdr); in ipfw_chk()
1051 PULLUP_TO(hlen, ulp, struct ip6_hbh); in ipfw_chk()
1053 hlen += (((struct ip6_hbh *)ulp)->ip6h_len + 1) << 3; in ipfw_chk()
[all …]
/freebsd-10-stable/sys/i386/ibcs2/
Dibcs2_socksys.c175 int error, sctl[2], hlen; local
195 hlen = strlen(hname);
196 ptr = hname + hlen;
197 if ((u_int)uap->len > (sizeof (hname) - hlen - 1))
208 hlen = strlen(hname) + 1;
209 return (kernel_sysctl(td, sctl, 2, 0, 0, hname, hlen, 0, 0));
/freebsd-10-stable/libexec/bootpd/
Dhwaddr.c218 haddrtoa(haddr, hlen) in haddrtoa() argument
220 int hlen;
225 if (hlen > MAXHADDRLEN)
226 hlen = MAXHADDRLEN;
229 while (hlen > 0) {
232 hlen--;
/freebsd-10-stable/sbin/dhclient/
Dparse.c157 int token, hlen; in parse_hardware_param() local
186 hlen = 0; in parse_hardware_param()
187 t = parse_numeric_aggregate(cfile, NULL, &hlen, COLON, 16, 8); in parse_hardware_param()
190 if (hlen > sizeof(hardware->haddr)) { in parse_hardware_param()
194 hardware->hlen = hlen; in parse_hardware_param()
196 hardware->hlen); in parse_hardware_param()
197 if (hlen < sizeof(hardware->haddr)) in parse_hardware_param()
198 memset(&hardware->haddr[hlen], 0, in parse_hardware_param()
199 sizeof(hardware->haddr) - hlen); in parse_hardware_param()
/freebsd-10-stable/sbin/swapon/
Dswapon.c763 sizetobuf(char *buf, size_t bufsize, int hflag, long long val, int hlen, in sizetobuf() argument
771 snprintf(buf, bufsize, "%*s", hlen, tmp); in sizetobuf()
773 snprintf(buf, bufsize, "%*lld", hlen, val / blocksize); in sizetobuf()
781 int hlen, mib[16], n, pagesize; in swaplist() local
794 hlen = 10; in swaplist()
799 hlen = 10; in swaplist()
804 hlen = 10; in swaplist()
809 hlen = 10; in swaplist()
812 getbsize(&hlen, &blocksize); in swaplist()
824 hlen, buf, in swaplist()
[all …]
/freebsd-10-stable/usr.bin/systat/
Dswap.c62 static int hlen; variable
124 header = getbsize(&hlen, &blocksize); in initswap()
167 -dlen, "Disk", hlen, header, ulen, "Used", in labelswap()
200 dlen + hlen + ulen + 1, in showswap()
208 wprintw(wnd, "%*d", hlen, CONVERT(kvmsw[i].ksw_total)); in showswap()
/freebsd-10-stable/lib/libutil/
Dlogin_class.c139 substvar(const char * var, const struct passwd * pwd, int hlen, int pch, int nlen) in substvar() argument
157 - dollas + (tildes * (pch+hlen)) in substvar()
175 memmove(p + hlen + v, p + 1, l); /* Subst homedir */ in substvar()
176 memmove(p, pwd->pw_dir, hlen); in substvar()
178 p[hlen] = '/'; in substvar()
179 p += hlen + v; in substvar()
199 int hlen = pwd ? strlen(pwd->pw_dir) : 0; in setclassenvironment() local
203 if (hlen && pwd->pw_dir[hlen-1] != '/') in setclassenvironment()
210 char * np = substvar(var, pwd, hlen, pch, nlen); in setclassenvironment()
236 if ((np = substvar(p, pwd, hlen, pch, nlen)) != NULL) { in setclassenvironment()

1234567