Lines Matching refs:fragment

53 static struct ip_frag	fragment[FRAG_MAX];	/* ip fragment buffers */
73 * display the fragment list. For debugging purposes.
81 printf("Dumping fragment info: (%d)\n\n", fragments);
84 if (fragment[i].mp == NULL)
86 printf("%d\t%d\t0x%x\t%d\t\t%d\t%d\n", fragment[i].more,
87 fragment[i].offset, fragment[i].mp->b_rptr,
88 fragment[i].ipid, fragment[i].iplen, fragment[i].iphlen);
89 total += (fragment[i].iplen - fragment[i].iphlen);
96 * This function returns index of fragment 0 of the current fragmented DGRAM
97 * (which would contain the transport header). Return the fragment number
98 * for success, -1 if we don't yet have the first fragment.
109 if (fragment[i].mp != NULL && fragment[i].offset == 0)
116 * This function returns index of the last fragment of the current DGRAM.
117 * Returns the fragment number for success, -1 if we don't yet have the
118 * last fragment.
129 if (fragment[i].mp != NULL && !fragment[i].more)
136 * This function adds a fragment to the current pkt fragment list. Returns
137 * FRAG_NOSLOTS if there are no more slots, FRAG_DUP if the fragment is
149 if (fragment[i].mp != NULL &&
150 fragment[i].offset == true_offset)
156 if (fragment[i].mp == NULL) {
157 fragment[i].more = (offset & IP_MF);
158 fragment[i].offset = true_offset;
159 fragment[i].mp = mp;
160 fragment[i].ipid = ipid;
161 fragment[i].iplen = iplen;
162 fragment[i].iphlen = iphlen;
163 fragment[i].ipp = ipp;
172 * Nuke a fragment.
177 if (fragment[index].mp != NULL) {
178 freeb(fragment[index].mp);
181 bzero((caddr_t)&fragment[index], sizeof (struct ip_frag));
199 * Analyze the fragment list - see if we captured all our fragments.
217 * match the id of the first fragment or don't match the IP
218 * protocol of the first fragment.
220 ip_id = fragment[first_frag].ipid;
221 ipp = fragment[first_frag].ipp;
223 if (fragment[i].mp != NULL && ip_id != fragment[i].ipid &&
224 fragment[i].ipp != ipp) {
227 fragment[i].ipid, ip_id);
236 total = fragment[last_frag].offset + fragment[last_frag].iplen -
237 fragment[last_frag].iphlen;
240 actual += (fragment[i].iplen - fragment[i].iphlen);
268 /* Get the IP header length of the first fragment. */
271 first_iph_len = fragment[i].iphlen;
273 if (fragment[i].mp != NULL) {
279 if (fragment[i].offset == 0) {
280 len = fragment[i].iplen;
283 len = fragment[i].iplen - fragment[i].iphlen;
289 bcopy((caddr_t)(fragment[i].mp->b_rptr),
293 bcopy((caddr_t)(fragment[i].mp->b_rptr +
294 fragment[i].iphlen),
296 fragment[i].offset), len);
604 trans_len = fragment[last_frag].offset +
605 fragment[last_frag].iplen - fragment[last_frag].iphlen;
609 * first fragment.
611 trans_len += fragment[first_frag].iphlen;
612 transp = (uint16_t *)(fragment[first_frag].mp->b_rptr +
613 fragment[first_frag].iphlen);
685 * Note: errno is set to ETIMEDOUT if fragment reassembly fails.
810 * Once we process the first fragment, we won't have
844 /* fragment 0 of fragmented datagram */
920 * fragment table, and the inetgram (igp) has been