mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
BXXP support, from Richard Sharpe <sharpe@ns.aus.com>.
This commit is contained in:
parent
7fb68b0c2d
commit
674302314e
1
CREDITS
1
CREDITS
@ -31,6 +31,7 @@ Additional people who have contributed patches:
|
||||
Motonori Shindo <mshindo@mshindo.net>
|
||||
Onno van der Linden <onno@simplex.nl>
|
||||
Rafal Maszkowski <rzm@icm.edu.pl>
|
||||
Richard Sharpe <sharpe@ns.aus.com>
|
||||
Rick Jones <raj@cup.hp.com>
|
||||
|
||||
The original LBL crew:
|
||||
|
1
FILES
1
FILES
@ -91,6 +91,7 @@ print-atalk.c
|
||||
print-atm.c
|
||||
print-bgp.c
|
||||
print-bootp.c
|
||||
print-bxxp.c
|
||||
print-cdp.c
|
||||
print-chdlc.c
|
||||
print-cip.c
|
||||
|
@ -17,7 +17,7 @@
|
||||
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.239 2000-09-19 14:57:27 guy Exp $ (LBL)
|
||||
# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.240 2000-09-30 03:35:55 guy Exp $ (LBL)
|
||||
|
||||
#
|
||||
# Various configurable paths (remember to edit Makefile.in, not Makefile)
|
||||
@ -79,7 +79,7 @@ CSRC = tcpdump.c \
|
||||
print-ipcomp.c print-mobile.c print-l2tp.c print-bgp.c print-rx.c \
|
||||
print-lane.c print-cip.c print-pppoe.c print-lcp.c \
|
||||
print-smb.c smbutil.c print-ascii.c print-telnet.c print-cnfp.c \
|
||||
print-vrrp.c print-cdp.c print-token.c
|
||||
print-vrrp.c print-cdp.c print-token.c print-bxxp.c
|
||||
|
||||
LOCALSRC = @LOCALSRC@
|
||||
GENSRC = version.c
|
||||
|
@ -18,7 +18,7 @@
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.136 2000-09-23 08:03:30 guy Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.137 2000-09-30 03:35:56 guy Exp $ (LBL)
|
||||
*/
|
||||
|
||||
#ifndef tcpdump_interface_h
|
||||
@ -209,6 +209,7 @@ extern void atalk_print(const u_char *, u_int);
|
||||
extern void atm_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
|
||||
extern void bootp_print(const u_char *, u_int, u_short, u_short);
|
||||
extern void bgp_print(const u_char *, int);
|
||||
extern void bxxp_print(const u_char *, u_int);
|
||||
extern void cnfp_print(const u_char *cp, u_int len, const u_char *bp);
|
||||
extern void decnet_print(const u_char *, u_int, u_int);
|
||||
extern void default_print(const u_char *, u_int);
|
||||
|
78
print-bxxp.c
Normal file
78
print-bxxp.c
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright (C) 2000, Richard Sharpe
|
||||
*
|
||||
* This software may be distributed either under the terms of the
|
||||
* BSD-style licence that accompanies tcpdump or under the GNU GPL
|
||||
* version 2 or later.
|
||||
*
|
||||
* print-bxxp.c
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/Attic/print-bxxp.c,v 1.1 2000-09-30 03:35:56 guy Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
#include <memory.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "extract.h"
|
||||
|
||||
/* Check for a string but not go beyond length
|
||||
* Return TRUE on match, FALSE otherwise
|
||||
*
|
||||
* Looks at the first few chars up to tl1 ...
|
||||
*/
|
||||
int
|
||||
l_strnstart(register const u_char *tstr1, register u_int tl1,
|
||||
register const u_char *str2, register u_int l2)
|
||||
{
|
||||
|
||||
if (tl1 > l2)
|
||||
return 0;
|
||||
|
||||
return (strncmp(tstr1, str2, tl1) == 0 ? 1 : 0);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
bxxp_print(register const u_char *bp, register u_int length)
|
||||
{
|
||||
|
||||
if (l_strnstart("REQ ", 4, bp, length)) { /* A REQuest */
|
||||
|
||||
printf(" BXXP REQ");
|
||||
|
||||
}
|
||||
else if (l_strnstart("RSP ", 4, bp, length)) {
|
||||
|
||||
printf(" BXXP RSP");
|
||||
|
||||
}
|
||||
else if (l_strnstart("SEQ ", 4, bp, length)) {
|
||||
|
||||
printf(" BXXP SEQ");
|
||||
|
||||
}
|
||||
else if (l_strnstart("END", 4, bp, length)) {
|
||||
|
||||
printf(" BXXP END");
|
||||
|
||||
}
|
||||
else
|
||||
printf(" BXXP (payload or undecoded)");
|
||||
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.75 2000-09-29 04:58:51 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.76 2000-09-30 03:35:56 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -130,6 +130,7 @@ static struct tcp_seq_hash tcp_seq_hash[TSEQ_HASHSIZE];
|
||||
#define BGP_PORT 179
|
||||
#endif
|
||||
#define NETBIOS_SSN_PORT 139
|
||||
#define BXXP_PORT 10288
|
||||
#ifndef NFS_PORT
|
||||
#define NFS_PORT 2049
|
||||
#endif
|
||||
@ -651,6 +652,8 @@ tcp_print(register const u_char *bp, register u_int length,
|
||||
bgp_print(bp, length);
|
||||
else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT)
|
||||
nbt_tcp_print(bp, length);
|
||||
else if (sport == BXXP_PORT || dport == BXXP_PORT)
|
||||
bxxp_print(bp, length);
|
||||
}
|
||||
return;
|
||||
bad:
|
||||
|
Loading…
Reference in New Issue
Block a user