Flowgrind
Advanced TCP traffic generator
fg_string.h
Go to the documentation of this file.
1 
6 /*
7  * Copyright (C) 2014 Alexander Zimmermann <alexander.zimmermann@netapp.com>
8  *
9  * This file is part of Flowgrind.
10  *
11  * Flowgrind is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * Flowgrind is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with Flowgrind. If not, see <http://www.gnu.org/licenses/>.
23  *
24  */
25 
26 #ifndef _FG_STRING_H_
27 #define _FG_STRING_H_
28 
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif /* HAVE_CONFIG_H */
32 
40 char *strdup_append(char *s, const char *a);
41 
51 char *strndup_append(char *s, const char *a, size_t n);
52 
61 size_t fmtlen(char const *fmt, va_list ap);
62 
75 int asprintf_append(char **resultp, const char *fmt, ...)
76  __attribute__((format(printf, 2, 3)));
77 
90 int vasprintf_append(char **resultp, const char *fmt, va_list ap)
91  __attribute__((format(printf, 2, 0)));
92 
93 #endif /* _FG_STRING_H_ */
asprintf_append
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 argume...
strdup_append
char * strdup_append(char *s, const char *a)
Append the duplication of string a to the given string s.
Definition: fg_string.c:76
vasprintf_append
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...
fmtlen
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 arg...
Definition: fg_string.c:61
strndup_append
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.
Definition: fg_string.c:87
config.h