Age | Commit message (Collapse) | Author | Files | Lines |
|
When testing trafgen with the following example from the man page the
error message "Failed to parse MAC address 11:22:33:44:55:66" is
printed.
trafgen -o lo --cpus 1 -n 3 '{ eth(da=11:22:33:44:55:66, da[0]=dinc()), tcp() }'
Turns out errno was not cleared before str2mac() called sscanf().
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add str2fqdn for converting hostname string into DNS name notation:
www.xxxx.yy.com -> 3www4xxxx2yy3com0
Returned string must be freed after use by the caller.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Don't add a trailing whitespace to the string returned by argv2str().
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add function to convert a string in the format xx:xx:xx:xx:xx:xx to a
MAC address byte array.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
[tk: Add len parameter and error out on too short buffers]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add argv_insert function to dynamically insert string
into argv list.
Also added argv_free func to easy free dynamically allocated
argv list.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Move piece of code which converts cmdline args vector to string
from netsniff-ng.c to str.c as function.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Break out all string handling functions and lockme stuff in order
to further eliminate the big code blob in xutils, so that it can
be easier maintained.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|