Home
last modified time | relevance | path

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

123

/illumos-gate/usr/src/uts/common/io/ppp/spppcomp/
H A Dvjcompress.c164 register uint_t hlen = getip_hl(ip); in vj_compress_tcp() local
190 thlen = (hlen + getth_off(th)) << 2; in vj_compress_tcp()
279 deltaS = hlen; in vj_compress_tcp()
494 register uint_t hlen; in vj_uncompress_uncomp() local
497 hlen = getip_hl(buf) << 2; in vj_uncompress_uncomp()
501 (hlen += getth_off(buf+hlen) << 2) > buflen || hlen > MAX_HDR) { in vj_uncompress_uncomp()
514 BCOPY(buf, &cs->cs_ip, hlen); in vj_uncompress_uncomp()
516 cs->cs_hlen = hlen & 0xff; in vj_uncompress_uncomp()
538 register uint_t hlen; in vj_uncompress_tcp() local
575 hlen = getip_hl(&cs->cs_ip) << 2; in vj_uncompress_tcp()
[all …]
H A Dspppcomp.c1329 int hlen; in spppcomp_inpkt() local
1351 hlen = i + 1; in spppcomp_inpkt()
1360 if (mp->b_rptr + hlen > mp->b_wptr) { in spppcomp_inpkt()
1365 if (!adjmsg(mp, hlen)) { in spppcomp_inpkt()
1368 hlen = 0; in spppcomp_inpkt()
1370 if (hlen != PPP_HDRLEN) { in spppcomp_inpkt()
1381 dp = mp->b_rptr + hlen - PPP_HDRLEN; in spppcomp_inpkt()
1389 mp->b_rptr += hlen; in spppcomp_inpkt()
1502 if (hlen > len) { in spppcomp_inpkt()
1503 hlen = len; in spppcomp_inpkt()
[all …]
/illumos-gate/usr/src/uts/common/inet/
H A Dip_impl.h72 #define IPH_TCPH_CHECKSUMP(ipha, hlen) \ argument
73 ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + TCP_CHECKSUM_OFFSET)))
75 #define IPH_UDPH_CHECKSUMP(ipha, hlen) \ argument
76 ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + UDP_CHECKSUM_OFFSET)))
78 #define IPH_ICMPV6_CHECKSUMP(ipha, hlen) \ argument
79 ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + ICMPV6_CHECKSUM_OFFSET)))
/illumos-gate/usr/src/boot/libsa/
H A Dip.c184 size_t hlen; in readipv4() local
242 hlen = ip->ip_hl << 2; in readipv4()
243 if (hlen < sizeof(*ip) || in readipv4()
244 in_cksum(ip, hlen) != 0) { in readipv4()
277 if (hlen != sizeof(*ip)) { in readipv4()
278 bcopy(((u_char *)ip) + hlen, uh, uh->uh_ulen - hlen); in readipv4()
280 n -= hlen - sizeof(*ip); in readipv4()
383 hlen = ipq->ipq_hdr->ip_hl << 2; in readipv4()
384 len = ntohs(ipq->ipq_hdr->ip_len) - hlen; in readipv4()
385 data = (char *)((uintptr_t)ipq->ipq_hdr + hlen); in readipv4()
/illumos-gate/usr/src/uts/common/inet/ipf/
H A Dip_log.c242 register size_t hlen; local
264 hlen = fin->fin_hlen;
291 hlen += MIN(sizeof(struct icmp) + 8,
295 hlen += MIN(sizeof(struct icmp),
312 hlen += MIN(sizeof(struct icmp6_hdr) + 8,
315 hlen += MIN(sizeof(struct icmp6_hdr),
361 mlen = fin->fin_plen - hlen;
370 ipfl.fl_hlen = (u_char)hlen;
395 sizes[1] = hlen + mlen;
399 sizes[1] = hlen + mlen;
[all …]
H A Dip_fil_solaris.c1318 int tlen, hlen; local
1337 hlen = sizeof(ip6_t);
1340 hlen = sizeof(ip_t);
1416 int i, hlen; local
1430 hlen = sizeof(*ip6);
1459 hlen = sizeof(*ip);
1475 fnew.fin_hlen = hlen;
1493 int hlen, code; local
1550 hlen = sizeof(ip_t);
2412 int rval, hlen; in ipf_hook() local
[all …]
H A Dfil.c1443 if (hlen < 2)
1483 hlen -= ol;
1511 int hlen; in fr_makefrip()
2322 int hlen;
2946 int hlen; local
2956 hlen = 0;
3045 m->m_off += hlen;
3047 m->m_len -= hlen;
3113 while (hlen) {
3116 hlen -= add;
[all …]
/illumos-gate/usr/src/cmd/boot/fiocompress/
H A Dfiocompress.c177 size_t blks, dstlen, hlen; in do_comp() local
182 hlen = offset = sizeof (struct comphdr) + blks * sizeof (uint64_t); in do_comp()
183 hdr = malloc(hlen); in do_comp()
185 (void) fprintf(stderr, HDR_ALLOC, hlen); in do_comp()
238 if (write(dstfd, hdr, hlen) != hlen) { in do_comp()
240 hlen, dstfile, strerror(errno)); in do_comp()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/traceroute/
H A Dtraceroute_aux.c335 int hlen; in check_reply() local
341 hlen = ip->ip_hl << 2; in check_reply()
342 if (cc < hlen + ICMP_MINLEN) { in check_reply()
349 cc -= hlen; in check_reply()
351 icp = (struct icmp *)(buf + hlen); in check_reply()
368 hlen = hip->ip_hl << 2; in check_reply()
369 cc -= hlen; in check_reply()
377 hicmp = (struct icmp *)((uchar_t *)hip + hlen); in check_reply()
388 up = (struct udphdr *)((uchar_t *)hip + hlen); in check_reply()
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/nc/
H A Dsocks.c156 size_t hlen, wlen; in socks_connect() local
208 hlen = strlen(host); in socks_connect()
209 if (hlen > 255) in socks_connect()
215 buf[4] = hlen; in socks_connect()
216 (void) memcpy(buf + 5, host, hlen); in socks_connect()
217 (void) memcpy(buf + 5 + hlen, &serverport, in socks_connect()
219 wlen = 5 + hlen + sizeof (serverport); in socks_connect()
/illumos-gate/usr/src/uts/intel/io/vmxnet3s/
H A Dvmxnet3_tx.c32 uint16_t hlen; member
80 ol->hlen = 0; in vmxnet3_tx_prepare_offload()
129 ol->hlen = ethLen + ipLen + tcpLen; in vmxnet3_tx_prepare_offload()
133 ret = ol->hlen; in vmxnet3_tx_prepare_offload()
137 ol->hlen = start + ethLen; in vmxnet3_tx_prepare_offload()
275 txDesc->txd.len < ol->hlen) { in vmxnet3_tx_one()
280 txDesc->txd.hlen = ol->hlen; in vmxnet3_tx_one()
292 (totLen - ol->hlen + ol->msscof - 1) / ol->msscof; in vmxnet3_tx_one()
/illumos-gate/usr/src/lib/libsip/common/
H A Dsip_reass.c80 int hlen; in sip_get_msglen() local
90 hlen = c - p; in sip_get_msglen()
91 if ((hlen + strlen("content-length")) >= msglen) in sip_get_msglen()
115 hlen = e - p + 4; /* 4 for 2 CRLFs ?? */ in sip_get_msglen()
116 value += hlen; in sip_get_msglen()
/illumos-gate/usr/src/lib/nsswitch/dns/common/
H A Ddns_common.c431 int hlen = 0, alen, iplen, len, isans; in _nss_dns_gethost_withttl() local
620 hlen = strlen(host); in _nss_dns_gethost_withttl()
622 if (hlen <= 0) { in _nss_dns_gethost_withttl()
638 if ((isans = strncasecmp(host, ans, hlen)) != 0 && in _nss_dns_gethost_withttl()
680 if (alen + hlen + 2 > NS_MAXMSG) { in _nss_dns_gethost_withttl()
688 alen += hlen; in _nss_dns_gethost_withttl()
689 apc += hlen; in _nss_dns_gethost_withttl()
699 hlen = len; in _nss_dns_gethost_withttl()
724 len = iplen + 2 + hlen + alen; in _nss_dns_gethost_withttl()
737 blen += hlen; in _nss_dns_gethost_withttl()
[all …]
/illumos-gate/usr/src/uts/common/inet/ip/
H A Dtn_ipopt.c824 uint_t hlen; in tsol_check_label_v4() local
867 if (hlen >= sec_opt_len) { in tsol_check_label_v4()
869 if (sec_opt_len == 0 && hlen > 0 && in tsol_check_label_v4()
882 if (hlen > 0) { in tsol_check_label_v4()
889 hlen = (hlen + 3) & ~3; in tsol_check_label_v4()
890 if (hlen > IP_MAX_HDR_LENGTH) in tsol_check_label_v4()
891 hlen = IP_MAX_HDR_LENGTH; in tsol_check_label_v4()
892 hlen -= IPH_HDR_LENGTH(ipha); in tsol_check_label_v4()
901 new_mp = allocb_tmpl(hlen + copylen + in tsol_check_label_v4()
1379 uint_t hlen; in tsol_check_label_v6() local
[all …]
H A Dip_arp.c818 uint32_t hlen, plen; in arp_process_packet() local
877 hlen = arh->arh_hlen; in arp_process_packet()
890 if ((hlen > 0 && hlen != ill->ill_phys_addr_length) || plen == 0) { in arp_process_packet()
913 arhp += hlen; in arp_process_packet()
918 arhp += hlen; in arp_process_packet()
1555 uint_t hlen; in arp_output() local
1582 cp = mp->b_cont->b_rptr + (AR_LL_HDR_SLACK + hlen + hlen); in arp_output()
1591 bcopy(haddr1, cp, hlen); in arp_output()
1592 cp += hlen; in arp_output()
1599 bzero(cp, hlen); in arp_output()
[all …]
/illumos-gate/usr/src/lib/libnsl/rpc/
H A Dgethostname.c47 gethostname(char *hname, int hlen) argument
58 (void) strncpy(hname, u.nodename, hlen);
/illumos-gate/usr/src/cmd/sdiff/
H A Dsdiff.c89 static int hlen; /* Half line length with space for gutter */ variable
211 hlen = (llen - WGUTTER +1)/2; in main()
407 (void) getlen((hlen + WGUTTER) % 8, bp); in put2()
540 if (tlen >= hlen) { in getlen()
551 if (tlen >= hlen) { in getlen()
564 if (tlen >= hlen) { in getlen()
578 if (tlen > hlen) { in getlen()
602 for (i = 0; i < hlen - len1; i++) in putmid()
/illumos-gate/usr/src/cmd/stat/common/
H A Ddsr.c487 size_t hlen = strlen(hostname); in cur_special() local
499 if (cp[hlen] != ',' && cp[hlen] != ':') { in cur_special()
500 special = &cp[hlen]; in cur_special()
507 cp = &cp[hlen]; in cur_special()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ping/
H A Dping_aux.c235 int hlen, hlen1; in check_reply() local
292 hlen = ip->ip_hl << 2; in check_reply()
294 if ((cc < sizeof (struct ip)) || (cc < hlen + ICMP_MINLEN)) { in check_reply()
302 cc -= hlen; in check_reply()
304 icp = (struct icmp *)(buf + hlen); in check_reply()
1061 hlen -= sizeof (struct ip); in check_reply()
1064 if (verbose && hlen > 0) in check_reply()
1065 pr_options((uchar_t *)buf, hlen); in check_reply()
/illumos-gate/usr/src/uts/common/io/myri10ge/drv/
H A Dmyri10ge_lro.c139 int hlen, ip_len, tcp_hdr_len, tcp_data_len; in myri10ge_lro_rx() local
217 hlen = ip_len + ETHERNET_HEADER_SIZE - tcp_data_len; in myri10ge_lro_rx()
288 m_head->b_rptr += hlen; in myri10ge_lro_rx()
/illumos-gate/usr/src/cmd/bhyve/
H A Dpci_virtio_net.c196 iov_trim_hdr(struct iovec *iov, int *iovcnt, unsigned int hlen) in iov_trim_hdr() argument
200 if (iov[0].iov_len < hlen) { in iov_trim_hdr()
208 iov[0].iov_len -= hlen; in iov_trim_hdr()
220 iov[0].iov_base = (void *)((uintptr_t)iov[0].iov_base + hlen); in iov_trim_hdr()
/illumos-gate/usr/src/cmd/ipf/tools/
H A Dipftest.c73 int fd, i, dir, c, loaded, dump, hlen; local
83 hlen = 0;
226 hlen = IP_HL(ip) << 2;
230 hlen = sizeof(ip6_t);
235 i = fr_check(ip, hlen, ifp, dir, &m, ifs);
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc/
H A Din.rdisc.c768 int hlen; in pr_pack() local
772 hlen = ip->ip_hl << 2; in pr_pack()
773 if (cc < hlen + ICMP_MINLEN) { in pr_pack()
780 cc -= hlen; in pr_pack()
781 icp = (struct icmp *)ALIGN(buf + hlen); in pr_pack()
819 pr_hex(buf+hlen, cc); in pr_pack()
822 if (in_cksum((ushort_t *)ALIGN(buf+hlen), cc)) { in pr_pack()
887 ALIGN(buf + hlen + ICMP_MINLEN + in pr_pack()
925 pr_hex(buf+hlen, cc); in pr_pack()
928 if (in_cksum((ushort_t *)ALIGN(buf+hlen), cc)) { in pr_pack()
/illumos-gate/usr/src/lib/libdhcputil/common/
H A Ddhcp_inittab.c551 int hlen = 0; in inittab_encode_e() local
614 hlen = ie->ds_dhcpv6 ? sizeof (*d6o) : 2; in inittab_encode_e()
617 if (hlen + length > 0) in inittab_encode_e()
618 result = malloc(hlen + length); in inittab_encode_e()
621 optstart += hlen; in inittab_encode_e()
747 length = (optstart - result) - hlen; in inittab_encode_e()
992 *lengthp = length + hlen; in inittab_encode_e()
/illumos-gate/usr/src/uts/common/io/bpf/
H A Dbpf.c170 int hlen; in bpf_movein() local
185 hlen = sizeof (struct ether_header); in bpf_movein()
189 hlen = 16; in bpf_movein()
193 hlen = 0; in bpf_movein()
197 hlen = 44; in bpf_movein()
204 align = 4 - (hlen & 3); in bpf_movein()
211 if (len < hlen || len - hlen > mtu) in bpf_movein()

123