summaryrefslogtreecommitdiff
path: root/print-openflow-1.3.c
Commit message (Collapse)AuthorAgeFilesLines
* OpenFlow: Refine more length checks.Denis Ovsienko2022-01-051-6/+5
| | | | | | | | | In print-openflow-1.0.c and print-openflow-1.3.c replace the remaining "goto invalid" checks with ND_ICHECK_U() and ND_ICHECKMSG_U(). Redo the changes from commit 1ce16ea: use the same order of arguments and the same comparison operators as before the change and lose the unsigned compensation, which is no longer required. Add another test case using a malformed packet from Francois-Xavier.
* Replace '(void)nd_print()' calls by nd_printjnp() callsFrancois-Xavier Le Bail2020-12-111-1/+1
| | | | | '(void)nd_print(ndo, start, start + len)' are replaced by 'nd_printjnp(ndo, start, len)'
* OpenFlow: Process message types via declarations.Denis Ovsienko2020-10-081-158/+248
| | | | | | | | | | | | Introduce struct of_msgtypeinfo and convert all the case blocks in of10_message_print() and of13_message_print() together with ofpt_str[] and the associated wrapper functions into array elements of this type. Convert the code remaining of both functions into a short generic of_message_print() function. Refer to the latest OpenFlow 1.3 PDF and update comments to use section numbers from that document.
* OpenFlow: Use len in all type-specific functions.Denis Ovsienko2020-10-081-16/+16
| | | | | | Add an unused "len" argument to a number of type-specific functions so the main message body printing functions always call the next function with (ndo, cp, len) from uniform case blocks.
* OpenFlow: Subtract OF_HEADER_FIXLEN in #defines.Denis Ovsienko2020-10-081-20/+22
| | | | | | | Take the repetitive subtractions out of the main message printing functions and make it obvious that all constants specific to message body length include the header length. For OpenFlow 1.0 define the modified lengths in unsigned terms in the same go.
* OpenFlow: Have a function for each message type.Denis Ovsienko2020-10-081-7/+14
| | | | | | | Move the remaining small blocks of message printing code out of of10_message_print() and of13_message_print() into standalone functions, this way all the case blocks in the two message body processing functions become more uniform.
* OpenFlow 1.3: Recognise 3 more messages types.Denis Ovsienko2020-10-041-0/+105
|
* OpenFlow 1.3: Fixed-size messages didn't use len.Denis Ovsienko2020-10-031-20/+20
| | | | | In that sequence of case blocks no function used length even if provided with, so consistently do not provide the length.
* OpenFlow 1.3: Recognise 3 more messages types.Denis Ovsienko2020-10-031-0/+141
|
* OpenFlow 1.3: Recognise 5 more messages types.Denis Ovsienko2020-10-021-0/+165
| | | | | Also add new OUIs and experimenter IDs for OFPT_EXPERIMENTER. Update two tests.
* Wrap some common code up as uint2tokary().Denis Ovsienko2020-09-301-23/+23
| | | | | | I like the ternary operator (in programming languages that define it with the same associativity as humans tend to presume), but sometimes a lookup function is better.
* OpenFlow 1.3: Implement OFPT_FEATURES_REPLY.Denis Ovsienko2020-09-301-0/+56
|
* OpenFlow 1.3: Get OFPT_HELLO right.Denis Ovsienko2020-09-301-1/+86
| | | | Decode the optional trailing data and update two tests.
* OpenFlow 1.3: Add initial partial support.Denis Ovsienko2020-09-281-0/+558
This code processes only the simplest message types (9 out of the 30 defined). Add a test from [1], which comes from [2], which comes from a contributor in Ericsson (Zoltán Lajos Kis). 1: https://wiki.wireshark.org/SampleCaptures#OpenFlow 2: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9283