"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "util-print.c" between
tcpdump-4.99.0.tar.gz and tcpdump-4.99.1.tar.gz

About: tcpdump is a tool for network monitoring and data acquisition.

util-print.c  (tcpdump-4.99.0):util-print.c  (tcpdump-4.99.1)
skipping to change at line 98 skipping to change at line 98
void void
fn_print_str(netdissect_options *ndo, const u_char *s) fn_print_str(netdissect_options *ndo, const u_char *s)
{ {
while (*s != '\0') { while (*s != '\0') {
fn_print_char(ndo, *s); fn_print_char(ndo, *s);
s++; s++;
} }
} }
/* /*
* Print out a null-terminated filename (or other ASCII string), part of
* the packet buffer.
* If ep is NULL, assume no truncation check is needed.
* Return true if truncated.
* Stop at ep (if given) or before the null char, whichever is first.
*/
int
nd_print(netdissect_options *ndo,
const u_char *s, const u_char *ep)
{
int ret;
u_char c;
ret = 1; /* assume truncated */
while (ep == NULL || s < ep) {
c = GET_U_1(s);
s++;
if (c == '\0') {
ret = 0;
break;
}
fn_print_char(ndo, c);
}
return(ret);
}
/*
* Print out a null-terminated filename (or other ASCII string) from * Print out a null-terminated filename (or other ASCII string) from
* a fixed-length field in the packet buffer, or from what remains of * a fixed-length field in the packet buffer, or from what remains of
* the packet. * the packet.
* *
* n is the length of the fixed-length field, or the number of bytes * n is the length of the fixed-length field, or the number of bytes
* remaining in the packet based on its on-the-network length. * remaining in the packet based on its on-the-network length.
* *
* If ep is non-null, it should point just past the last captured byte * If ep is non-null, it should point just past the last captured byte
* of the packet, e.g. ndo->ndo_snapend. If ep is NULL, we assume no * of the packet, e.g. ndo->ndo_snapend. If ep is NULL, we assume no
* truncation check, other than the checks of the field length/remaining * truncation check, other than the checks of the field length/remaining
 End of changes. 1 change blocks. 
27 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)