Francois-Xavier Le Bail
e835e6a934
Fix spaces
2017-12-17 13:12:36 +01:00
Francois-Xavier Le Bail
e74cccfe79
FR: Fix extracting the DE flag
...
Update the output of a test accordingly.
2017-12-17 12:34:13 +01:00
Francois-Xavier Le Bail
9113e560eb
NFS: Use more the EXTRACT_BE_U_4 macro
2017-12-17 09:30:00 +01:00
Guy Harris
6a58ce3ad1
Directly refer to ether_shost and ether_dhost; get rid of ESRC() and EDST().
...
They don't really add anything.
2017-12-16 19:57:14 -08:00
Guy Harris
a08e63fd7a
Move NTOH and HTON macros into addrname.c
...
We don't want to encourage people to use them in code that pulls data
out of packets, as we want that code to use the EXTRACT_ macros.
2017-12-16 19:52:35 -08:00
Francois-Xavier Le Bail
41dbcba30b
Use more the EXTRACT_U_1() macro (57/n)
2017-12-16 21:35:08 +01:00
Francois-Xavier Le Bail
b01cc24ce4
Simplify some expressions
2017-12-16 20:46:46 +01:00
Guy Harris
ed4e3d85a3
More cleanups.
...
Add the current BGP RFC as a comment.
Use unsigned types where appropriate.
Use size_t where appropriate.
Further whitespace cleanups.
2017-12-16 10:50:00 -08:00
Francois-Xavier Le Bail
6d65e3df34
Use more the EXTRACT_U_1() macro (56/n)
2017-12-16 15:01:02 +01:00
Guy Harris
e18798ad05
Use EXTRACT_BE_U_4() to fetch a 4-byte big-endian value from a packet.
2017-12-16 00:34:12 -08:00
Guy Harris
eb58492d87
More whitespace cleanup.
2017-12-16 00:05:49 -08:00
Guy Harris
1a859e9f5c
Re-fix indentation.
2017-12-15 22:51:45 -08:00
Guy Harris
27cc76fd53
Fix build.
2017-12-15 22:37:49 -08:00
Francois-Xavier Le Bail
f066b01db4
Remove a never used macro
2017-12-16 07:36:24 +01:00
Guy Harris
762439d880
Merge pull request #630 from davidcronin-arista/master
...
tcpdump should decode BGP add-path NLRI and withrawn routes correctly
2017-12-15 22:34:56 -08:00
Guy Harris
6ec714988c
Merge branch 'master' into master
2017-12-15 22:34:42 -08:00
Guy Harris
6ceeae50d8
Temporarily undo whitespace cleanups to help a pull request.
...
Hopefully this will reduce the number of conflicts.
2017-12-15 22:32:02 -08:00
Guy Harris
ae1a0ebcd6
Clean up white space.
...
Consistently use 4-space, no-tab indentation.
2017-12-15 22:29:24 -08:00
Guy Harris
c9ed5865f3
Redo BGP dissection a bit.
...
Don't copy structures out of the packet, access them in-place using the
EXTRACT_ macros as appropriate, as we already did for some packet types.
Declare the structures using nd_ types.
Rename bgp_header_print() to bgp_pdu_print(), because, after dissecting
and printing stuff from the header, it calls routines to dissect the
body.
2017-12-15 16:04:26 -08:00
Guy Harris
0489e347dc
Use nd_ types for ONC RPC.
...
We don't do this for NFS; that'd require more work. The NFS dissector
is already using EXTRACT_ calls for the NFS message.
2017-12-15 12:21:50 -08:00
Francois-Xavier Le Bail
1a04b92e36
Use more the ND_TTEST_1() macro
2017-12-15 19:39:00 +01:00
Guy Harris
09393e2faa
Pull rpl.h into print-icmp6.c; nothing else uses it.
2017-12-14 20:30:09 -08:00
Guy Harris
aeb105bfbf
Use nd_ types in AppleTalk structures, and add EXTRACT_ calls.
2017-12-14 19:27:49 -08:00
Guy Harris
a5874ee6b1
Update the -s documentation.
...
The -s default is now large, so it's not as if you'll have to increase
it to get more packet data; you might have to *decrease* it to avoid
dropping packets.
2017-12-14 15:48:30 -08:00
Francois-Xavier Le Bail
3e6a7011af
ISIS: Replace ND_TCHECK2 calls by ND_TCHECK_LEN calls
2017-12-14 22:51:27 +01:00
Francois-Xavier Le Bail
ce4e690346
OSPFv3: Replace ND_TCHECK2 call by ND_TCHECK_LEN call
2017-12-14 22:41:15 +01:00
Francois-Xavier Le Bail
8bd200e5a3
NTP: Replace ND_TCHECK2 calls by ND_TCHECK_LEN calls
2017-12-14 22:32:15 +01:00
Francois-Xavier Le Bail
81e4dfecd3
ICMPv6: Replace ND_TCHECK2 calls by ND_TCHECK_LEN calls
2017-12-14 22:21:52 +01:00
Francois-Xavier Le Bail
607d4a5c33
ICMP: Replace ND_TTEST2 calls by ND_TTEST_LEN calls
2017-12-14 22:16:55 +01:00
Francois-Xavier Le Bail
329b43101e
TCP: Replace ND_TTEST2 calls by ND_TTEST_LEN calls
2017-12-14 21:50:06 +01:00
Guy Harris
41b9478cc8
Use nd_ types for OSPF and OSPF6 packets.
...
And add EXTRACT_ calls as required.
Remove no-longer-necessary & operators in EXTRACT_ calls.
2017-12-14 10:28:57 -08:00
Guy Harris
6fe4295795
Use nd_ types for AH headers.
2017-12-13 20:43:33 -08:00
Guy Harris
41c93b0d33
C99 type, not BSD type; use uint16_t.
2017-12-13 11:11:32 -08:00
Francois-Xavier Le Bail
5cea270318
Remove all storage class specifier 'register'
...
Let the compiler do the optimizations (or not) based on build options.
Avoid 'value has been optimized out' messages in gdb using '-O0'.
2017-12-13 19:17:47 +01:00
Guy Harris
e9306685c6
Use MAC_ADDR_LEN, and don't include ether.h.
...
We no longer have an ether.h header; the only thing we used from it is
ETHER_ADDR_LEN, and netdissect.h defines MAC_ADDR_LEN, so use that
instead.
2017-12-13 09:44:09 -08:00
Guy Harris
76015fad3b
C99 type, not BSD type; use uint8_t.
2017-12-13 09:39:43 -08:00
Guy Harris
37185d198e
Use nd_ types for DNS.
...
Make some types unsigned, and fix some loops to no longer depend on a
zero count rolling over to -1 when decremented.
2017-12-13 09:32:44 -08:00
Guy Harris
7068209574
Use nd_ types in 802.x and FDDI headers.
...
Use EXTRACT_U_1() as required by those changes. Remove
no-longer-necessary & operators from other EXTRACT_ calls.
While we're at it, add MAC_ADDR_LEN to netdissect.h, and use it instead
of ETHER_ADDR_LEN; eliminate ETHER_ADDR_LEN.
Move the maximum Ethernet length field value to ethertype.h, under the
name MAX_ETHERNET_LENGTH_VAL.
Move the Ethernet header structure, and the #define for the Ethernet
header length, to print-ether.c; in non-Ethernet dissectors that were
using the Ethernet header structure, just declare two nd_mac_addr
variables for the source and destination MAC addresses and use them
instead of the Ethernet header (we don't need the type field there).
These changes leave nothing in ether.h, so eliminate it.
2017-12-12 10:36:21 -08:00
Guy Harris
a95802aa0d
Use nd_ types in the IPv6 structures.
...
And add the EXTRACT_U_1() calls as needed.
Change some other EXTRACT_ calls that no longer need an & operator.
2017-12-11 19:38:35 -08:00
Francois-Xavier Le Bail
e2f0616cd0
Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (2/n)
2017-12-11 22:21:33 +01:00
Francois-Xavier Le Bail
84ef17ac0e
Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)
...
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l)
ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
2017-12-11 22:11:01 +01:00
Guy Harris
264ed29aae
Clean up white space.
2017-12-11 10:11:16 -08:00
Guy Harris
baeb308320
Fix build if you have a crypto library.
2017-12-11 02:53:24 -08:00
Guy Harris
0f328b4aa1
More nd_ification of structures.
...
We don't need to use & to get a pointer to an nd_uintN_t/nd_intN_t type,
as they're arrays.
2017-12-11 00:17:47 -08:00
Guy Harris
e1dd70a1b6
Add some new nd_ types for use in structures for packet layouts.
...
Note that nd_ipv4 is used for IPv4 netmasks as well as IPv4 addresses.
2017-12-11 00:08:25 -08:00
Guy Harris
d841ae4103
Get rid of an unused structure.
2017-12-10 23:56:16 -08:00
Guy Harris
3f3f2505f2
Make nd_uint8_t and nd_int8_t arrays, to catch direct references.
...
This catches direct references, so we can change them to use EXTRACT_U_1
or EXTRACT_S_1.
Also, change some structures to use the nd_ types that weren't already
using them.
Then make the appropriate EXTRACT_{U,S}_1() changes.
2017-12-10 16:23:34 -08:00
Francois-Xavier Le Bail
fa2faabe61
Remove unused macros in nameser.h
2017-12-10 22:21:37 +01:00
Francois-Xavier Le Bail
c56f25c54b
Use more the EXTRACT_U_1() macro (55/n)
2017-12-10 21:33:49 +01:00
Francois-Xavier Le Bail
8094b3bdfb
Use more the EXTRACT_U_1() macro (54/n)
2017-12-10 19:26:45 +01:00