mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-24 10:33:28 +08:00
Commit more changes from the previous two.
This commit is contained in:
parent
6f5599b24b
commit
5301862d30
@ -148,7 +148,6 @@ HDR = \
|
||||
ipnet.h \
|
||||
ipproto.h \
|
||||
ipsec_doi.h \
|
||||
ipx.h \
|
||||
isakmp.h \
|
||||
l2tp.h \
|
||||
l2vpn.h \
|
||||
@ -190,7 +189,6 @@ HDR = \
|
||||
tcp.h \
|
||||
tcpdump-stdinc.h \
|
||||
telnet.h \
|
||||
tftp.h \
|
||||
timed.h \
|
||||
token.h \
|
||||
udp.h
|
||||
|
25
print-ipx.c
25
print-ipx.c
@ -39,9 +39,32 @@ static const char rcsid[] _U_ =
|
||||
|
||||
#include "interface.h"
|
||||
#include "addrtoname.h"
|
||||
#include "ipx.h"
|
||||
#include "extract.h"
|
||||
|
||||
/* well-known sockets */
|
||||
#define IPX_SKT_NCP 0x0451
|
||||
#define IPX_SKT_SAP 0x0452
|
||||
#define IPX_SKT_RIP 0x0453
|
||||
#define IPX_SKT_NETBIOS 0x0455
|
||||
#define IPX_SKT_DIAGNOSTICS 0x0456
|
||||
#define IPX_SKT_NWLINK_DGM 0x0553 /* NWLink datagram, may contain SMB */
|
||||
#define IPX_SKT_EIGRP 0x85be /* Cisco EIGRP over IPX */
|
||||
|
||||
/* IPX transport header */
|
||||
struct ipxHdr {
|
||||
u_int16_t cksum; /* Checksum */
|
||||
u_int16_t length; /* Length, in bytes, including header */
|
||||
u_int8_t tCtl; /* Transport Control (i.e. hop count) */
|
||||
u_int8_t pType; /* Packet Type (i.e. level 2 protocol) */
|
||||
u_int16_t dstNet[2]; /* destination net */
|
||||
u_int8_t dstNode[6]; /* destination node */
|
||||
u_int16_t dstSkt; /* destination socket */
|
||||
u_int16_t srcNet[2]; /* source net */
|
||||
u_int8_t srcNode[6]; /* source node */
|
||||
u_int16_t srcSkt; /* source socket */
|
||||
};
|
||||
|
||||
#define ipxSize 30
|
||||
|
||||
static const char *ipxaddr_string(u_int32_t, const u_char *);
|
||||
void ipx_decode(const struct ipxHdr *, const u_char *, u_int);
|
||||
|
43
print-tftp.c
43
print-tftp.c
@ -42,7 +42,48 @@ static const char rcsid[] _U_ =
|
||||
#include "interface.h"
|
||||
#include "addrtoname.h"
|
||||
#include "extract.h"
|
||||
#include "tftp.h"
|
||||
|
||||
/*
|
||||
* Trivial File Transfer Protocol (IEN-133)
|
||||
*/
|
||||
#define SEGSIZE 512 /* data segment size */
|
||||
|
||||
/*
|
||||
* Packet types.
|
||||
*/
|
||||
#define RRQ 01 /* read request */
|
||||
#define WRQ 02 /* write request */
|
||||
#define DATA 03 /* data packet */
|
||||
#define ACK 04 /* acknowledgement */
|
||||
#define TFTP_ERROR 05 /* error code */
|
||||
#define OACK 06 /* option acknowledgement */
|
||||
|
||||
struct tftphdr {
|
||||
unsigned short th_opcode; /* packet type */
|
||||
union {
|
||||
unsigned short tu_block; /* block # */
|
||||
unsigned short tu_code; /* error code */
|
||||
char tu_stuff[1]; /* request packet stuff */
|
||||
} th_u;
|
||||
char th_data[1]; /* data or error string */
|
||||
};
|
||||
|
||||
#define th_block th_u.tu_block
|
||||
#define th_code th_u.tu_code
|
||||
#define th_stuff th_u.tu_stuff
|
||||
#define th_msg th_data
|
||||
|
||||
/*
|
||||
* Error codes.
|
||||
*/
|
||||
#define EUNDEF 0 /* not defined */
|
||||
#define ENOTFOUND 1 /* file not found */
|
||||
#define EACCESS 2 /* access violation */
|
||||
#define ENOSPACE 3 /* disk full or allocation exceeded */
|
||||
#define EBADOP 4 /* illegal TFTP operation */
|
||||
#define EBADID 5 /* unknown transfer ID */
|
||||
#define EEXISTS 6 /* file already exists */
|
||||
#define ENOUSER 7 /* no such user */
|
||||
|
||||
static const char tstr[] = " [|tftp]";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user