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
Francois-Xavier Le Bail
e44bc94ad0
Use pointer expressions like in most similar cases
2017-12-10 15:17:06 +01:00
Francois-Xavier Le Bail
6bb65331a5
Use more the EXTRACT_U_1() macro (53/n)
...
Assignment, p[n], (more)
2017-12-10 11:40:35 +01:00
Francois-Xavier Le Bail
07ac438e08
Use more the EXTRACT_U_1() macro (52/n)
...
Assignment, p[n]
2017-12-09 14:05:25 +01:00
Francois-Xavier Le Bail
1cfd6cd2ac
Use more the EXTRACT_U_1() macro (51/n)
...
Moreover: Use more the ND_ISPRINT() macro.
2017-12-09 11:46:15 +01:00
Francois-Xavier Le Bail
ef3437c081
Use more the EXTRACT_U_1() macro (50/n)
2017-12-09 10:17:18 +01:00
Francois-Xavier Le Bail
67224592b3
RSVP: Add a missing bounds check
2017-12-09 10:03:58 +01:00
Francois-Xavier Le Bail
3a7639e545
Use more the EXTRACT_U_1() macro (49/n)
...
Assignment, *(p)
2017-12-09 09:56:29 +01:00
Francois-Xavier Le Bail
58010245a5
Use more the EXTRACT_U_1() macro (48/n)
2017-12-09 09:26:39 +01:00
Guy Harris
29517faf6c
More EXTRACT_U_1() replacing direct dereferences.
2017-12-08 17:57:39 -08:00
Guy Harris
fd7da470bf
More EXTRACT_U_1() replacing direct dereferences.
2017-12-08 17:53:56 -08:00
Guy Harris
514e7d324b
More EXTRACT_U_1() replacing direct dereferences.
...
Replace some double parentheses with single parentheses while we're at it.
2017-12-08 17:52:25 -08:00
Guy Harris
f2046003ab
More EXTRACT_U_1() replacing direct dereferences.
2017-12-08 17:46:02 -08:00
Guy Harris
498aed69df
Another EXTRACT_U_1() replacing a direct dereference.
2017-12-08 17:44:36 -08:00
Guy Harris
93e131bf37
Some more EXTRACT_U_1() calls replacing direct fetches.
2017-12-08 17:43:11 -08:00
Francois-Xavier Le Bail
b524a7d97c
Use HTTPS in README.md
2017-12-06 17:39:55 +01:00
Francois-Xavier Le Bail
4e9236f477
Fix two bounds checks in signature_verify()
2017-12-05 21:28:47 +01:00