libpcap  1.10.1
About: libpcap is a packet filter library used by tools like tcpdump.
  Fossies Dox: libpcap-1.10.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

portability.h File Reference
#include <stdarg.h>
#include "pcap/funcattrs.h"
Include dependency graph for portability.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define timeradd(a, b, result)
 
#define timersub(a, b, result)
 

Functions

size_t pcap_strlcat (char *restrict dst, const char *restrict src, size_t dstsize)
 
size_t pcap_strlcpy (char *restrict dst, const char *restrict src, size_t dstsize)
 
int pcap_asprintf (char **, const char *,...)
 
int pcap_vasprintf (char **, const char *, va_list ap)
 
char * pcap_strtok_r (char *, const char *, char **)
 

Macro Definition Documentation

◆ timeradd

#define timeradd (   a,
  b,
  result 
)
Value:
do { \
(result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
(result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
if ((result)->tv_usec >= 1000000) { \
++(result)->tv_sec; \
(result)->tv_usec -= 1000000; \
} \
} while (0)

Definition at line 117 of file portability.h.

◆ timersub

#define timersub (   a,
  b,
  result 
)
Value:
do { \
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
if ((result)->tv_usec < 0) { \
--(result)->tv_sec; \
(result)->tv_usec += 1000000; \
} \
} while (0)

Definition at line 128 of file portability.h.

Function Documentation

◆ pcap_asprintf()

int pcap_asprintf ( char **  strp,
const char *  format,
  ... 
)

◆ pcap_strlcat()

size_t pcap_strlcat ( char *restrict  dst,
const char *restrict  src,
size_t  dstsize 
)

Definition at line 36 of file strlcat.c.

Referenced by fileconf_read(), and pcap_remoteact_list().

◆ pcap_strlcpy()

◆ pcap_strtok_r()

char* pcap_strtok_r ( char *  s,
const char *  delim,
char **  last 
)

Definition at line 44 of file strtok_r.c.

Referenced by fileconf_save(), main(), and sock_check_hostlist().

◆ pcap_vasprintf()

int pcap_vasprintf ( char **  strp,
const char *  format,
va_list  ap 
)

Definition at line 14 of file asprintf.c.

References vsnprintf().

Referenced by pcap_asprintf().