summaryrefslogtreecommitdiff
path: root/staging/layer1.c
AgeCommit message (Collapse)AuthorFilesLines
2018-05-31mausezahn: Restore handling of raw hex string passed in on command lineNick Grauel1-1/+5
Originally all hex strings (whether they were given on the command line or in a file) were handled by a call to str2hex(): bytestring_s = str2hex (tx.arg_string, bytestring, MAX_PAYLOAD_SIZE); Commit f634c74 added code to parse out "payload=" or "p=" flags that may have been added at the start of the hex string. This code also changed the logic around this str2hex() call to only call the function and populate bytestring_s if one of these flags was found. This broke the ability to pass in a raw hex string on the command line since it fails the check and bytestring_s is never populated with the hex bytes. I've added an else condition to make the str2hex() call using the old method in cases where no "payload=" or "p=" flags are found. Signed-off-by: Nick Grauel <nicolas.grauel@plexxi.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-01-21mausezahn: Fix reading of hex payload fileThomas Fleischmann1-2/+6
Using the option -F with mausezahn, to read input out of a hexfile, results in corrupt data transmitted (first byte will always be 0). Properly parse "payload="/p=" at the start of the file by the same method as used in layer3.c and layer4.c Closes #153 Reference: http://permalink.gmane.org/gmane.linux.network.netsniff-ng/600 Signed-off-by: Thomas Fleischmann <thomas.fleischmann.08@googlemail.com> Reported-by: Thomas De Schampheleire Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-09-03mausezahn: Fix non-ANSI function declarationsTobias Klauser1-1/+1
ANSI C doesn't allow empty parameter list, thus use void where appropriate. This fixes the corresponding sparse warning. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-05-13staging: add mausezahn staging directoryDaniel Borkmann1-0/+383
After some back and forth, we decided that it is easier to maintain mausezahn in a staging directory until it is fully reworked and cleaned up to be ready to be fully integrated. This way, it is better than having it in a separate branch, and we can also accept patches from outside more easily. Also, while at it, fix up some function mismatches with libcli. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>