added library build mode

This commit is contained in:
Mohamed Boussaffa
2016-03-03 04:07:26 +08:00
parent c0b69e51af
commit 5e28001c70
12 changed files with 502 additions and 133 deletions

View File

@@ -227,32 +227,6 @@ int process_ip6 (u_char * userdata, const dp_header * /* header */, const u_char
return false;
}
void quit_cb (int /* i */)
{
procclean();
if ((!tracemode) && (!DEBUG))
exit_ui();
exit(0);
}
void forceExit(bool success, const char *msg, ...)
{
if ((!tracemode)&&(!DEBUG)){
exit_ui();
}
va_list argp;
va_start(argp, msg);
vfprintf(stderr, msg, argp);
va_end(argp);
std::cerr << std::endl;
if (success)
exit(EXIT_SUCCESS);
else
exit(EXIT_FAILURE);
}
class handle {
public:
handle (dp_handle * m_handle, const char * m_devicename = NULL,