summaryrefslogtreecommitdiff
path: root/print-syslog.c
Commit message (Collapse)AuthorAgeFilesLines
* Put "{" at end of line with "if" to keep a consistent styleFrancois-Xavier Le Bail2023-04-191-2/+1
| | | | [skip ci]
* Replace the (void)nd_printn(..., NULL) calls by nd_printjn() callsFrancois-Xavier Le Bail2021-01-081-1/+1
| | | | | Moreover: Remove a now useless comment.
* SYSLOG: Make a few cleanups.Denis Ovsienko2020-09-301-18/+31
| | | | | Add a comment to tell the specification. Untangle the PRI parsing code. Replace a loop with nd_printn() to print a counted string.
* Remove many (762) now redundant ND_TCHECK_n() callsFrancois-Xavier Le Bail2020-09-061-10/+1
| | | | | | | | | | | ND_TCHECK_n(e), n in { 1, 2, 3, 4, 8 }. They are redundant because they are followed by a GET_.*_n(e) call, same n, same e, which do the bounds check. Remove unused 'trunc' labels and most associated codes. Update the outputs of some tests accordingly.
* Use the new GET_ macros instead of the EXTRACT_ onesFrancois-Xavier Le Bail2019-03-261-6/+6
| | | | | | | The exceptions are currently: Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer. An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer pointer.
* syslog: fix a typo in a commentDenis Ovsienko2018-07-061-1/+1
| | | | [skip ci]
* Print truncations with nd_print_trunc() instead of tstr[] stringsFrancois-Xavier Le Bail2018-05-041-4/+3
| | | | | | | | Remove the tstr[] strings. Update the output of some tests accordingly. Moreover: Add or update some ndo_protocol fields.
* Remove the safeputchar() functionFrancois-Xavier Le Bail2018-05-021-1/+1
| | | | | | Print the characters filtering out non-printable with fn_print_char(). Update the output of some tests accordingly.
* Add the ndo_protocol field in the netdissect_options structureFrancois-Xavier Le Bail2018-03-161-0/+1
| | | | | Update this field in printer entry functions. It will be used for some printings.
* Always include <config.h> rather than "config.h".Guy Harris2018-01-211-1/+1
| | | | | | | | This can prevent bizarre failures if, for example, you've done a configuration in the top-level source directory, leaving behind one config.h file, and then do an out-of-tree build in another directory, with different configuration options. This way, we always pick up the same config.h, in the build directory.
* Use quoted include netdissect-stdinc.h instead of angle-bracketed oneFrancois-Xavier Le Bail2018-01-211-1/+1
|
* Update ND_PRINT() as a variadic macroFrancois-Xavier Le Bail2018-01-071-7/+7
|
* Remove all storage class specifier 'register'Francois-Xavier Le Bail2017-12-131-1/+1
| | | | | | Let the compiler do the optimizations (or not) based on build options. Avoid 'value has been optimized out' messages in gdb using '-O0'.
* Use more the EXTRACT_U_1() macro (51/n)Francois-Xavier Le Bail2017-12-091-3/+3
| | | | Moreover: Use more the ND_ISPRINT() macro.
* Use more the EXTRACT_U_1() macro (35/n)Francois-Xavier Le Bail2017-11-301-1/+1
| | | | In some safeputchar() calls, *(p).
* Use more the EXTRACT_U_1() macro (32/n)Francois-Xavier Le Bail2017-11-281-2/+2
| | | | | In: while (... *(p) ...) ..., while (... *(p + e) ...) ...
* Use more ND_TCHECK_n()/ND_TTEST_n() macrosFrancois-Xavier Le Bail2017-11-241-4/+4
|
* syslog: squelch a cppcheck warning (GH #568)Denis Ovsienko2017-09-051-3/+3
| | | | | | | | [print-syslog.c:98]: (style) Array index 'msg_off' is used before limits check. Even though this is a false positive in this specific case, let's not have it around, this will make it less likely missing a real one.
* zero change: update Hannes Gredler's emailHannes Gredler2017-07-281-1/+1
|
* Add a summary comment in all other printersFrancois-Xavier Le Bail2016-08-151-0/+2
| | | | | | | Moreover: Remove some redundant comments Update some summary comments Update the specification URL for ATA over Ethernet (AoE) protocol
* Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'Francois-Xavier Le Bail2015-09-101-1/+1
| | | | Get the full log via: git log --follow netdissect-stdinc.h
* Printers must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-051-1/+1
|
* dismiss NETDISSECT_REWORKED macroDenis Ovsienko2015-03-221-1/+0
| | | | | | | The purpose of this macro was to enable the file-by-file switch to NDO, after which only tcpdump.c had a use of it and the definitions guarded by it. Update tcpdump.c not to require them any more and dismiss the unused definitions.
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-3/+3
| | | | | | | | | And, as we require at least autoconf 2.61, and as autoconf 2.61 and later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to define the uintN_t and intN_t macros if the system doesn't define them for us. This lets us get rid of bitypes.h as well.
* NDOize EAP, IEEE CFM, lwres, SIP & Syslog decodersDenis Ovsienko2014-04-011-19/+18
|
* NDOize safeputs() and safeputchar()Denis Ovsienko2014-04-011-1/+1
|
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | Remove lots of $Header's and a few $Id's that all belong to the former CVS repository of tcpdump itself. These keywords have been frozen since the migration to git in late 2008.
* ndo-ize print-ascii: hex_print_with_offset()Michael Richardson2014-01-011-1/+1
|
* make consistent use of the "tstr" idiomDenis Ovsienko2013-12-261-3/+5
| | | | | | | | For each decoder that has more than one instance of truncation signaling and prints the same string in each instance make sure that the string is declared as "static const char tstr[]" right after the initial includes block. Where necessary, replace fputs(s, stdout) with equivalent printf("%s", s).
* syslog: refine the decoderDenis Ovsienko2013-09-121-29/+15
| | | | | | Switch to TCHECK2() and improve format checks further. Remove some excess code, an unused #include, some trailing whitespace and a few empty lines.
* fix parsing of syslog priority (GH #264)Bram2013-09-121-1/+1
| | | | | | | | | | | | | | | | | ...the code * first looks for '<' and advances to the next character, * it looks for a number between 0 and 9 and advances to the next character, (it finds 7) * it looks for '>' and advances to the next character, * it looks for a number between 0 and 9 and advances to the next character, (it finds the '2' of '2010') => result: prio is 72 instead of 7. The code that checks if the character is '>' should be outside the loop that checks if the character is a number. The attached patch moves this check.
* unset executable bit on a few .h and .c filesDenis Ovsienko2013-04-201-0/+0
|
* add support for sysloghannes2004-10-291-0/+163