![]() |
Flowgrind
Advanced TCP traffic generator
|
Functions to manipulate strings used by Flowgrind. More...
#include "config.h"Go to the source code of this file.
Functions | |
| int | asprintf_append (char **resultp, const char *fmt,...) __attribute__((format(printf |
Realloc resultp to append the formatted result of fmt and return a pointer to it via the first argument. More... | |
| size_t | fmtlen (char const *fmt, va_list ap) |
Determine the number of characters that would be generated by a printf with format string fmt and arguments ap. More... | |
| char * | strdup_append (char *s, const char *a) |
Append the duplication of string a to the given string s. More... | |
| char * | strndup_append (char *s, const char *a, size_t n) |
Append at most n characters of the duplication of string a to the given string s. More... | |
| int int | vasprintf_append (char **resultp, const char *fmt, va_list ap) __attribute__((format(printf |
Realloc resultp to append the formatted result of fmt and ap and return a pointer to it via the first argument. More... | |
Functions to manipulate strings used by Flowgrind.
Definition in file fg_string.h.
| int asprintf_append | ( | char ** | resultp, |
| const char * | fmt, | ||
| ... | |||
| ) |
Realloc resultp to append the formatted result of fmt and return a pointer to it via the first argument.
Good for gradually accumulating output into a string buffer. Appends at the end of the string
| [in,out] | resultp | destination string to append to |
| [in] | fmt | format string |
| [in] | ... | parameters used to fill fmt |
| size_t fmtlen | ( | char const * | fmt, |
| va_list | ap | ||
| ) |
Determine the number of characters that would be generated by a printf with format string fmt and arguments ap.
| [in] | fmt | format string |
| [in] | ap | parameters used to fill fmt |
Definition at line 61 of file fg_string.c.
| char* strdup_append | ( | char * | s, |
| const char * | a | ||
| ) |
Append the duplication of string a to the given string s.
| [in] | s | destination string to append to |
| [in] | a | source string to be append |
Definition at line 76 of file fg_string.c.
| char* strndup_append | ( | char * | s, |
| const char * | a, | ||
| size_t | n | ||
| ) |
Append at most n characters of the duplication of string a to the given string s.
| [in] | s | destination string to append to |
| [in] | a | source string to be append |
| [in] | n | number of characters to be append from the string |
Definition at line 87 of file fg_string.c.
| int int vasprintf_append | ( | char ** | resultp, |
| const char * | fmt, | ||
| va_list | ap | ||
| ) |
Realloc resultp to append the formatted result of fmt and ap and return a pointer to it via the first argument.
Good for gradually accumulating output into a string buffer. Appends at the end of the string.
| [in,out] | resultp | destination string to append to |
| [in] | fmt | format string |
| [in] | ap | parameters used to fill fmt |