tcpflow  1.6.1
About: tcpflow is a TCP/IP packet demultiplexer that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis and debugging.
  Fossies Dox: tcpflow-1.6.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dfxml_writer.cpp File Reference
#include "config.h"
#include <errno.h>
#include <unistd.h>
#include <iostream>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <sys/param.h>
#include <assert.h>
#include <fcntl.h>
#include <stack>
#include <streambuf>
#include "dfxml_writer.h"
Include dependency graph for dfxml_writer.cpp:

Go to the source code of this file.


#define MUTEX_INIT(M)   {}
#define MUTEX_LOCK(M)   {}
#define MUTEX_UNLOCK(M)   {}
#define _S_IREAD   256
#define _S_IWRITE   128
#define O_BINARY   0
#define _O_SHORT_LIVED   0
#define ms_printf   __print
#define TM_FORMAT   "%Y-%m-%dT%H:%M:%SZ"


int mkstemp (char *tmpl)
static const char * cstr (const string &str)
static string xml_lt ("&lt;")
static string xml_gt ("&gt;")
static string xml_am ("&amp;")
static string xml_ap ("&apos;")
static string xml_qu ("&quot;")
static string encoding_null ("%00")
static string encoding_r ("%0D")
static string encoding_n ("%0A")
static string encoding_t ("%09")
int vasprintf (char **ret, const char *fmt, va_list ap)


static const char * xml_header = "<?xml version='1.0' encoding='UTF-8'?>\n"

Macro Definition Documentation


#define __MINGW_ATTRIB_NONNULL (   x)

Definition at line 320 of file dfxml_writer.cpp.


#define _O_SHORT_LIVED   0

Definition at line 92 of file dfxml_writer.cpp.


#define _S_IREAD   256

Definition at line 80 of file dfxml_writer.cpp.


#define _S_IWRITE   128

Definition at line 84 of file dfxml_writer.cpp.

◆ ms_printf

#define ms_printf   __print

Definition at line 319 of file dfxml_writer.cpp.


#define MUTEX_INIT (   M)    {}

implementation for C++ XML generation class

The software provided here is released by the Naval Postgraduate School, an agency of the U.S. Department of Navy. The software bears no warranty, either expressed or implied. NPS does not assume legal liability nor responsibility for a User's use of the software or the results of such use.

Please note that within the United States, copyright protection, under Section 105 of the United States Code, Title 17, is not available for any work of the United States Government and/or for any works created by United States Government employees. User acknowledges that this software contains work which was created by NPS government employees and is therefore in the public domain and not subject to copyright.

Definition at line 43 of file dfxml_writer.cpp.


#define MUTEX_LOCK (   M)    {}

Definition at line 44 of file dfxml_writer.cpp.


#define MUTEX_UNLOCK (   M)    {}

Definition at line 45 of file dfxml_writer.cpp.


#define O_BINARY   0

Definition at line 88 of file dfxml_writer.cpp.


#define TM_FORMAT   "%Y-%m-%dT%H:%M:%SZ"

Function Documentation

◆ cstr()

static const char* cstr ( const string &  str)

Definition at line 120 of file dfxml_writer.cpp.

◆ encoding_n()

static string encoding_n ( "%0A"  )

◆ encoding_null()

static string encoding_null ( "%00"  )

◆ encoding_r()

static string encoding_r ( "%0D"  )

◆ encoding_t()

static string encoding_t ( "%09"  )

◆ mkstemp()

int mkstemp ( char *  tmpl)

Definition at line 96 of file dfxml_writer.cpp.


◆ vasprintf()

int vasprintf ( char **  ret,
const char *  fmt,
va_list  ap 

We do not have vasprintf. We have determined that vsnprintf() does not perform properly on windows. So we just allocate a huge buffer and then strdup() and hope!

Definition at line 331 of file dfxml_writer.cpp.

◆ xml_am()

static string xml_am ( "&amp;"  )

◆ xml_ap()

static string xml_ap ( "&apos;"  )

◆ xml_gt()

static string xml_gt ( "&gt;"  )

◆ xml_lt()

static string xml_lt ( "&lt;"  )

◆ xml_qu()

static string xml_qu ( "&quot;"  )

Variable Documentation

◆ xml_header

const char* xml_header = "<?xml version='1.0' encoding='UTF-8'?>\n"

Definition at line 74 of file dfxml_writer.cpp.