Home
last modified time | relevance | path

Searched refs:fraglen (Results 1 – 20 of 20) sorted by relevance

/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/
H A Dsnoop_socks.c34 static void put_socks5_addr(char *cp, const unsigned char *buf, int fraglen);
39 interpret_socks_call(flags, line, fraglen) in interpret_socks_call() argument
42 int fraglen;
51 if (fraglen >= 2) {
58 if (fraglen >= 8) {
67 if (fraglen > 8) {
71 i < 40 && i < fraglen;
92 if (2 + n == fraglen) {
96 for (i = 0; i < n && 2 + i < fraglen; ++i) {
100 } else if (fraglen >= 6 && buf[2] == 0) {
[all …]
H A Dsnoop_ipsec.c52 interpret_esp(int flags, uint8_t *hdr, int iplen, int fraglen) in interpret_esp() argument
60 if (fraglen < sizeof (esph_t)) in interpret_esp()
61 return (fraglen); /* incomplete header */ in interpret_esp()
103 interpret_ah(int flags, uint8_t *hdr, int iplen, int fraglen) in interpret_ah() argument
115 if (fraglen < sizeof (ah_t)) in interpret_ah()
116 return (fraglen); /* incomplete header */ in interpret_ah()
134 fraglen -= ahlen; in interpret_ah()
135 if (fraglen < 0) in interpret_ah()
136 return (fraglen + ahlen); /* incomplete header */ in interpret_ah()
196 &fraglen); in interpret_ah()
[all …]
H A Dsnoop_udp.c48 interpret_udp(int flags, struct udphdr *udp, int iplen, int fraglen) in interpret_udp() argument
56 if (fraglen < sizeof (struct udphdr)) in interpret_udp()
57 return (fraglen); /* incomplete header */ in interpret_udp()
61 fraglen -= sizeof (struct udphdr); in interpret_udp()
62 if (fraglen > udplen) in interpret_udp()
63 fraglen = udplen; in interpret_udp()
100 udplen > fraglen ? in interpret_udp()
116 data, fraglen)) { in interpret_udp()
117 if (fraglen > 0 && sunrpc) in interpret_udp()
118 interpret_rpc(flags, data, fraglen, IPPROTO_UDP); in interpret_udp()
[all …]
H A Dsnoop_ospf.c129 interpret_ospf_hello(int flags, struct ospfhdr *op, int fraglen) in interpret_ospf_hello() argument
134 if (fraglen < OSPF_MIN_HEADER_SIZE + OSPF_MIN_HELLO_HEADER_SIZE) in interpret_ospf_hello()
150 while ((uchar_t *)nbr < ((uchar_t *)op + fraglen)) { in interpret_ospf_hello()
152 ((uchar_t *)op + fraglen)) in interpret_ospf_hello()
188 while ((uchar_t *)nbr < ((uchar_t *)op + fraglen)) { in interpret_ospf_hello()
190 ((uchar_t *)op + fraglen)) in interpret_ospf_hello()
197 return (fraglen); in interpret_ospf_hello()
538 interpret_ospf(int flags, struct ospfhdr *ospf, int iplen, int fraglen) in interpret_ospf() argument
546 if ((fraglen < OSPF_MIN_HEADER_SIZE) || in interpret_ospf()
547 (fraglen < ntohs(ospf->ospf_len))) in interpret_ospf()
[all …]
H A Dsnoop_ospf6.c76 interpret_ospf6_hello(int flags, struct ospf6hdr *op, int fraglen) in interpret_ospf6_hello() argument
81 if (fraglen < OSPF6_MIN_HEADER_SIZE + OSPF_MIN_HELLO_HEADER_SIZE) in interpret_ospf6_hello()
97 while ((uchar_t *)nbr < ((uchar_t *)op + fraglen)) { in interpret_ospf6_hello()
99 ((uchar_t *)op + fraglen)) in interpret_ospf6_hello()
136 while ((uchar_t *)nbr < ((uchar_t *)op + fraglen)) { in interpret_ospf6_hello()
138 ((uchar_t *)op + fraglen)) in interpret_ospf6_hello()
145 return (fraglen); in interpret_ospf6_hello()
585 interpret_ospf6(int flags, struct ospf6hdr *ospf, int iplen, int fraglen) in interpret_ospf6() argument
593 if ((fraglen < OSPF6_MIN_HEADER_SIZE) || in interpret_ospf6()
594 (fraglen < ntohs(ospf->ospf6_len))) in interpret_ospf6()
[all …]
H A Dsnoop_vxlan.c26 interpret_vxlan(int flags, char *data, int fraglen) in interpret_vxlan() argument
31 if (fraglen < sizeof (vxlan_hdr_t)) { in interpret_vxlan()
36 show_header("VXLAN RUNT: ", "Short packet", fraglen); in interpret_vxlan()
38 return (fraglen); in interpret_vxlan()
63 fraglen -= sizeof (vxlan_hdr_t); in interpret_vxlan()
66 return (interpret_ether(flags, data, fraglen, fraglen)); in interpret_vxlan()
H A Dsnoop_ip.c83 interpret_ip(int flags, const struct ip *ip, int fraglen) in interpret_ip() argument
94 iplen = interpret_ipv6(flags, (ip6_t *)ip, fraglen); in interpret_ip()
106 fraglen -= hdrlen; in interpret_ip()
107 if (fraglen > iplen) in interpret_ip()
108 fraglen = iplen; in interpret_ip()
109 if (fraglen < 0) { in interpret_ip()
111 "IP truncated: header missing %d bytes", -fraglen); in interpret_ip()
113 return (fraglen + iplen); in interpret_ip()
147 iplen > fraglen ? "?" : "", in interpret_ip()
186 iplen > fraglen ? " -- truncated" : ""); in interpret_ip()
[all …]
H A Dsnoop_rip6.c51 interpret_rip6(int flags, struct rip6 *rip6, int fraglen) in interpret_rip6() argument
70 len = fraglen - 4; in interpret_rip6()
89 fraglen); in interpret_rip6()
103 len = fraglen - 4; in interpret_rip6()
126 return (fraglen); in interpret_rip6()
H A Dsnoop_tcp.c78 interpret_tcp(int flags, struct tcphdr *tcp, int iplen, int fraglen) in interpret_tcp() argument
91 fraglen -= hdrlen; in interpret_tcp()
92 if (fraglen < 0) in interpret_tcp()
93 return (fraglen + hdrlen); /* incomplete header */ in interpret_tcp()
94 if (fraglen > tcplen) in interpret_tcp()
95 fraglen = tcplen; in interpret_tcp()
135 valid_rpc(data + 4, fraglen - 4); in interpret_tcp()
217 ntohs(tcp->th_sport), ntohs(tcp->th_dport), data, fraglen)) { in interpret_tcp()
218 if (sunrpc && fraglen > 0) in interpret_tcp()
219 interpret_rpc(flags, data, fraglen, IPPROTO_TCP); in interpret_tcp()
H A Dsnoop_http.c61 interpret_http(int flags, char *line, int fraglen) in interpret_http() argument
67 endp = line + fraglen; in interpret_http()
81 show_header("HTTP: ", "HyperText Transfer Protocol", fraglen); in interpret_http()
121 return (fraglen); in interpret_http()
H A Dsnoop_sctp.c955 interpret_chunks(int flags, sctp_chunk_hdr_t *cp, int fraglen) in interpret_chunks() argument
979 fraglen -= pad; in interpret_chunks()
985 if (fraglen < 0 || fraglen < sizeof (*cp)) { in interpret_chunks()
986 if (fraglen > 0 && flags & F_DTAIL) { in interpret_chunks()
991 return (fraglen); in interpret_chunks()
995 if (fraglen < clen) { in interpret_chunks()
1000 return (fraglen); in interpret_chunks()
1056 fraglen -= clen; in interpret_chunks()
1064 interpret_sctp(int flags, sctp_hdr_t *sctp, int iplen, int fraglen) in interpret_sctp() argument
1086 fraglen -= sizeof (*sctp); in interpret_sctp()
[all …]
H A Dsnoop_rpc.c69 interpret_rpc(int flags, char *rpc, int fraglen, int type) in interpret_rpc() argument
82 xdr_init(rpc, fraglen); in interpret_rpc()
88 return (fraglen); in interpret_rpc()
108 rpc, fraglen); in interpret_rpc()
133 rpc, fraglen); in interpret_rpc()
164 rpc, fraglen); in interpret_rpc()
210 show_header("RPC: ", "SUN RPC Header", fraglen); in interpret_rpc()
230 prog, vers, proc, rpc, fraglen); in interpret_rpc()
233 rpc_detail_reply(flags, xid, x, rpc, fraglen); in interpret_rpc()
238 return (fraglen); in interpret_rpc()
H A Dsnoop_tftp.c42 interpret_tftp(int flags, void *data, int fraglen) in interpret_tftp() argument
46 int blocksize = fraglen - 4; in interpret_tftp()
107 fraglen - sizeof (tftp->th_opcode), &opts)); in interpret_tftp()
116 fraglen); in interpret_tftp()
166 fraglen - sizeof (tftp->th_opcode), &opts)); in interpret_tftp()
173 return (fraglen); in interpret_tftp()
H A Dsnoop_slp.c162 interpret_slp(int flags, void *slp, int fraglen) in interpret_slp() argument
168 msglength = fraglen; in interpret_slp()
176 if (add_tcp_cont(tce, slp, fraglen)) { in interpret_slp()
178 fraglen = tce->curr_offset; in interpret_slp()
184 interpret_slp_v2(flags, slp, fraglen); in interpret_slp()
186 interpret_slp_v1(flags, slp, fraglen); in interpret_slp()
622 int fraglen, int dst_port) { in reg_tcp_cont() argument
633 memcpy(tce->msg, msg, fraglen); in reg_tcp_cont()
635 tce->curr_offset = fraglen; in reg_tcp_cont()
643 static int add_tcp_cont(struct tcp_cont *tce, char *msg, int fraglen) { in add_tcp_cont() argument
[all …]
H A Dsnoop_ntp.c57 interpret_ntp(int flags, struct ntpdata *ntp_pkt, int fraglen) in interpret_ntp() argument
89 (void) memcpy(&fragbuf, ntp_pkt, MIN(sizeof (fragbuf), fraglen)); in interpret_ntp()
125 show_header("NTP: ", "Network Time Protocol", fraglen); in interpret_ntp()
206 fraglen < (LEN_PKT_NOMAC + MAC_OCTETS_MIN)) { in interpret_ntp()
217 macbytes = fraglen - (LEN_PKT_NOMAC + sizeof (uint32_t)); in interpret_ntp()
371 return (fraglen); in interpret_ntp()
H A Dsnoop_rip.c44 interpret_rip(int flags, struct rip *rip, int fraglen) in interpret_rip() argument
63 if ((len = fraglen - 4) < 0) in interpret_rip()
146 len = fraglen - 4; in interpret_rip()
147 show_header("RIP: ", "Routing Information Protocol", fraglen); in interpret_rip()
379 return (fraglen - len); in interpret_rip()
H A Dsnoop_mip.c286 interpret_mip_cntrlmsg(int flags, uchar_t *msg, int fraglen) { in interpret_mip_cntrlmsg() argument
299 if (fraglen < sizeof (regreq_t)) in interpret_mip_cntrlmsg()
304 regext_size = fraglen - sizeof (regreq_t); in interpret_mip_cntrlmsg()
308 if (fraglen < sizeof (regrep_t)) in interpret_mip_cntrlmsg()
313 regext_size = fraglen - sizeof (regrep_t); in interpret_mip_cntrlmsg()
501 show_header("MIP: ", "Mobile IP Header", fraglen); in interpret_mip_cntrlmsg()
626 fraglen = interpret_extensions(regext_data, regext_size, REG); in interpret_mip_cntrlmsg()
H A Dsnoop_ldap.c119 interpret_ldap(flags, data, fraglen, src, dst) in interpret_ldap() argument
122 int fraglen;
132 (void) decode_ldap(data, fraglen);
137 "Lightweight Directory Access Protocol Header", fraglen);
/illumos-gate/usr/src/uts/common/io/rtw/
H A Drtw.c2034 uint32_t flags, int fraglen, int rate, struct rtw_ieee80211_duration *d0, in rtw_compute_duration() argument
2051 npkt = paylen / fraglen; in rtw_compute_duration()
2052 lastlen0 = paylen % fraglen; in rtw_compute_duration()
2060 lastlen = fraglen + overlen; in rtw_compute_duration()
2066 firstlen = fraglen + overlen; in rtw_compute_duration()
/illumos-gate/usr/src/uts/common/inet/sctp/
H A Dsctp_input.c945 uint16_t fraglen = 0; in sctp_data_frag() local
1151 fraglen += ntohs(qdc->sdh_len); in sctp_data_frag()
1155 srp->sr_msglen += fraglen; in sctp_data_frag()