/******************************************************************************************************************************/
/* stuff to load WinPcap's packet.dll and the functions required from it */
+static PCHAR (*p_PacketGetVersion) (void);
static LPADAPTER (*p_PacketOpenAdapter) (char *adaptername);
static void (*p_PacketCloseAdapter) (LPADAPTER);
static int (*p_PacketRequest) (LPADAPTER, int, void *);
/* These are the symbols I need or want from packet.dll */
static const symbol_table_t symbols[] = {
+ SYM(PacketGetVersion, FALSE),
SYM(PacketOpenAdapter, FALSE),
SYM(PacketCloseAdapter, FALSE),
- SYM(PacketRequest, TRUE),
+ SYM(PacketRequest, FALSE),
{ NULL, NULL, FALSE }
};
sym++;
}
-
has_wpacket = TRUE;
}
/* functions to access the NDIS driver values */
+/* get dll version */
+char *
+wpcap_packet_get_version(void)
+{
+ if(!has_wpacket) {
+ return NULL;
+ }
+ return p_PacketGetVersion();
+}
+
+
/* open the interface */
void *
wpcap_packet_open(char *if_name)
{
- LPADAPTER adapter;
+ LPADAPTER adapter;
+ g_assert(has_wpacket);
adapter = p_PacketOpenAdapter(if_name);
return adapter;
wpcap_packet_close(void *adapter)
{
+ g_assert(has_wpacket);
p_PacketCloseAdapter(adapter);
}