The Assimilation Project  based on Assimilation version
pcap_GSource.h File Reference

libpcap Packet capture Gsource interface description More...

#include <projectcommon.h>
#include <glib.h>
#include <pcap_min.h>
#include <frameset.h>
Include dependency graph for pcap_GSource.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _GSource_pcap
 g_main_loop GSource object for creating events from libpcap (pcap_t) objects We manage this with our C-Class Management system to help catch errors. More...


typedef struct _GSource_pcap GSource_pcap_t


WINEXPORT GSource * g_source_pcap_new (const char *dev, unsigned listenmask, gboolean(*dispatch)(GSource_pcap_t *gsource, pcap_t *capstruct, gconstpointer pkt, gconstpointer pend, const struct pcap_pkthdr *pkthdr, const char *capturedev, gpointer userdata), GDestroyNotify notify, gint priority, gboolean can_recurse, GMainContext *context, gsize objectsize, gpointer userdata)
 Construct new GSource from a newly constructed pcap capture object. More...
WINEXPORT void g_source_pcap_finalize (GSource *src)
 The GMainLoop finalize function for libpcap packet capturing Called when this object is 'finalized' (destroyed) More...
WINEXPORT FrameSetconstruct_pcap_frameset (guint16 framesettype, gconstpointer pkt, gconstpointer pktend, const struct pcap_pkthdr *pkthdr, const char *interfacep)
 Construct a PCAP capture FrameSet from a PCAP packet. More...

Detailed Description

libpcap Packet capture Gsource interface description

This code creates a GSource object for capturing our LLDP or libpcap packets.

recode the g_source_pcap stuff to be classes in our C-Class system.

This file is part of the Assimilation Project.

Copyright © 2011, 2012 - Alan Robertson
The Assimilation software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see

Definition in file pcap_GSource.h.

Typedef Documentation

typedef struct _GSource_pcap GSource_pcap_t

Definition at line 33 of file pcap_GSource.h.