Lines Matching +full:end +full:- +full:point
2 * Copyright (c) 1988-1997
5 * Copyright (c) 1998-2012 Michael Richardson <mcr@tcpdump.org>
27 #include "netdissect-stdinc.h"
61 return (-1); in nd_init()
67 * XXX - should we just fail if this fails? Some of the in nd_init()
126 return (-1); in nd_load_smi_module()
133 return (-1); in nd_load_smi_module()
157 ndspi->ndspi_buffer = new_buffer; in nd_push_buffer()
158 ndspi->ndspi_packetp = ndo->ndo_packetp; in nd_push_buffer()
159 ndspi->ndspi_snapend = ndo->ndo_snapend; in nd_push_buffer()
160 ndspi->ndspi_prev = ndo->ndo_packet_info_stack; in nd_push_buffer()
162 ndo->ndo_packetp = new_packetp; in nd_push_buffer()
163 ndo->ndo_snapend = new_packetp + newlen; in nd_push_buffer()
164 ndo->ndo_packet_info_stack = ndspi; in nd_push_buffer()
176 * given a pointer into the packet and a length past that point in
177 * the packet, calculate a new snapshot end that's at the lower
178 * of the current snapshot end and that point in the packet;
180 * set the snapshot end to that new value.
191 ndspi->ndspi_buffer = NULL; /* no new buffer */ in nd_push_snaplen()
192 ndspi->ndspi_packetp = ndo->ndo_packetp; in nd_push_snaplen()
193 ndspi->ndspi_snapend = ndo->ndo_snapend; in nd_push_snaplen()
194 ndspi->ndspi_prev = ndo->ndo_packet_info_stack; in nd_push_snaplen()
199 ndo->ndo_packet_info_stack = ndspi; in nd_push_snaplen()
211 snaplen_remaining = (u_int)(ndo->ndo_snapend - bp); in nd_push_snaplen()
220 ndo->ndo_snapend = bp + newlen; in nd_push_snaplen()
229 * given a pointer into the packet and a length past that point in
230 * the packet, calculate a new snapshot end that's at the lower
231 * of the previous snapshot end - or, if there is no previous
232 * snapshot end, the current snapshot end - and that point in the
235 * set the snapshot end to that new value.
237 * This is to change the current snapshot end. This may increase the
238 * snapshot end, as it may be used, for example, for a Jumbo Payload
249 ndspi = ndo->ndo_packet_info_stack; in nd_change_snaplen()
250 if (ndspi->ndspi_prev != NULL) in nd_change_snaplen()
251 previous_snapend = ndspi->ndspi_prev->ndspi_snapend; in nd_change_snaplen()
253 previous_snapend = ndo->ndo_snapend; in nd_change_snaplen()
257 * snapend - or, if there is no previous snapend, after in nd_change_snaplen()
267 snaplen_remaining = (u_int)(previous_snapend - bp); in nd_change_snaplen()
276 ndo->ndo_snapend = bp + newlen; in nd_change_snaplen()
285 ndspi = ndo->ndo_packet_info_stack; in nd_pop_packet_info()
286 ndo->ndo_packetp = ndspi->ndspi_packetp; in nd_pop_packet_info()
287 ndo->ndo_snapend = ndspi->ndspi_snapend; in nd_pop_packet_info()
288 ndo->ndo_packet_info_stack = ndspi->ndspi_prev; in nd_pop_packet_info()
290 free(ndspi->ndspi_buffer); in nd_pop_packet_info()
297 while (ndo->ndo_packet_info_stack != NULL) in nd_pop_all_packet_info()
304 longjmp(ndo->ndo_early_end, ND_TRUNCATED); in nd_trunc_longjmp()