Commit Graph

4764 Commits

Author SHA1 Message Date
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
Francois-Xavier Le Bail
9f1e5edac5 WB: Fix a bounds check 2017-12-05 19:21:23 +01:00
Francois-Xavier Le Bail
03a2d9c4c1 Use more the EXTRACT_U_1() macro (47/n)
In: if (... *(p) ...) ...
2017-12-05 10:45:44 +01:00
Guy Harris
7e3467df25 Add an IPX/RIP/SAP test. 2017-12-04 13:52:40 -08:00
Francois-Xavier Le Bail
451ac4c753 Use more the ND_TCHECK_1() macro 2017-12-04 21:00:57 +01:00
Francois-Xavier Le Bail
00b189d27c Use more the ND_TCHECK_1() macro 2017-12-04 17:50:29 +01:00
Guy Harris
6cdc7551b8 Use a byte pointer in the IPX SAP and RIP printers.
That makes it like every other printer.

Add some checks against the on-the-network length while we're at it.
2017-12-03 22:19:12 -08:00
Francois-Xavier Le Bail
4166458a2a Use more the EXTRACT_U_1() macro (46/n)
In: if (... p[n] ...) ...
2017-12-03 21:51:36 +01:00
Francois-Xavier Le Bail
c027ae2601 Use more the EXTRACT_U_1() macro (45/n)
In ND_PRINT() macro call(s) (step 10).

p[n] ...
2017-12-03 14:51:59 +01:00
Francois-Xavier Le Bail
10a52254ae Use more the EXTRACT_U_1() macro (44/n)
In: switch (... p[n] ...) ...
2017-12-03 14:00:15 +01:00
Francois-Xavier Le Bail
61c422a88c Use more the EXTRACT_U_1() macro (43/n)
In: if (... p[n] ...) ...
2017-12-03 13:35:26 +01:00
Francois-Xavier Le Bail
a5bb53dd74 Simplify some expressions 2017-12-03 11:13:27 +01:00
Francois-Xavier Le Bail
e83dfd9b16 Simplify some expressions
This will also help some future scripted code updates.
2017-12-02 20:52:22 +01:00
Francois-Xavier Le Bail
2d20acd742 VJC: Update the input buffer pointer type to 'u_char *' 2017-12-02 16:03:43 +01:00
Francois-Xavier Le Bail
dbcba20b5e Use more the EXTRACT_U_1() macro (42/n)
In: switch (... p[n] ...) ...
2017-12-02 00:04:55 +01:00
Francois-Xavier Le Bail
d2def296e9 Use more the EXTRACT_U_1() macro (41/n)
In: switch (... *(p) ...) ...
2017-12-01 23:48:54 +01:00
Francois-Xavier Le Bail
d7b497cac7 Use more the EXTRACT_U_1() macro (40/n)
In some macros and functions calls.
p[n], unsigned char *p.
2017-12-01 22:35:28 +01:00
Francois-Xavier Le Bail
505cd1fe15 Use more the EXTRACT_U_1() macro (39/n)
In some macros and functions call, p[n]
2017-12-01 15:48:41 +01:00
Francois-Xavier Le Bail
7199dd316f Use more the EXTRACT_U_1() macro (38/n)
In some ND_ISPRINT() macro calls.
2017-12-01 10:27:42 +01:00
Francois-Xavier Le Bail
7eef8dd52b Use more the ND_ISPRINT() macro 2017-12-01 10:17:11 +01:00
Francois-Xavier Le Bail
1ff5460667 Use more the EXTRACT_U_1() macro (37/n)
In some snprintf() calls.
2017-12-01 09:32:31 +01:00
Francois-Xavier Le Bail
034c2fc03a Use more the EXTRACT_U_1() macro (36/n)
In a unsigned_relts_print() call.
The Interval field is one byte length (RFC3973).
2017-12-01 09:03:19 +01:00
Francois-Xavier Le Bail
129e79857a Travis-CI: Add the libraries used by libpcap in its .travis.yml 2017-11-30 23:26:05 +01:00
Francois-Xavier Le Bail
97de8ca7bd Use more the EXTRACT_U_1() macro (35/n)
In some safeputchar() calls, *(p).
2017-11-30 23:08:07 +01:00
Guy Harris
bfdad0f58f Fix typo, and request additional libraries for *static* linking. 2017-11-30 12:59:54 -08:00
Guy Harris
6779fd3ba7 Rename configure.in to configure.ac.
This matches what was done with libpcap; it's what autoconf prefers.
2017-11-30 10:20:37 -08:00
Guy Harris
cfc4c750a2 Fix the handling of libpcap.
We have four possibilities:

  1) local library, with a pcap-config;
  2) local library, without a pcap-config;
  3) installed library, with a pcap-config;
  4) installed library, without a pcap-config.

If we have a local library, i.e. one in ../libpcap{whatever}, we:

    add -I flags to the C compiler flags to point it at whatever
    directories in ../libpcap{whatever};

    add ../libpcap{whatever}/libpcap.a to $LIBS and:

        if it has a pcap-config, we use it, with --additional-libraries,
        to find the additional libraries with which we need to link;

        otherwise, we do the usual OS-dependent hacks to try to figure
        out with what additional flags we need to link;

    and add them to $LIBS after libpcap.a.

If we have an installed library:

    if it has a pcap-config we use it, with --cflags, to find what flags
    to add to the C compiler flags, and use it, with --libs, to see what
    flags to add to $LIBS;

    if it doesn't have a pcap-config, we search for -lpcap and, if that
    succeeds, we assume the headers are under /usr/local/include or
    /usr/include, search for them there, and, if we don't find pcap.h
    there, we look for it in a pcap subdirectory under there, and add
    the appropriate -I flag to the C compiler flags, and then do the
    usual OS-dependent hacks to try to figure out with what additional
    flags we need to link.

While we're at it, we do the libdlpi check only on Solaris, as part of
"the usual OS-dependent hacks".
2017-11-29 18:18:18 -08:00
Francois-Xavier Le Bail
415160c0c2 Use more ND_TCHECK_n() macros 2017-11-29 21:06:51 +01:00
Francois-Xavier Le Bail
320f3db18f Use more the EXTRACT_U_1() macro (34/n)
In some snprintf() calls.
2017-11-29 10:31:10 +01:00
Francois-Xavier Le Bail
ad3d3f5c67 Use more the EXTRACT_U_1() macro (33/n) 2017-11-29 08:06:21 +01:00
Guy Harris
de0c7fc746 Fix mkdep invocations.
CC is not guaranteed to be space-free; quote it.

DEPENDENCY_CFLAG is also not guaranteed to be space-free; quote it.
2017-11-28 22:06:37 -08:00
Francois-Xavier Le Bail
dcca20dd39 Use more the ND_TCHECK_1() macro 2017-11-28 22:51:30 +01:00
Francois-Xavier Le Bail
dde3aa9975 Use more the EXTRACT_U_1() macro (32/n)
In: while (... *(p) ...) ...,
    while (... *(p + e) ...) ...
2017-11-28 22:22:35 +01:00
Francois-Xavier Le Bail
f085c93f59 Use more the EXTRACT_U_1() macro (31/n)
In ND_PRINT() macro call(s) (step 9).

*(p)
2017-11-27 20:57:24 +01:00