PCap Library

I'm able to do most everything in the PCap library successfully, except install this callback function. The line I bolded in the code below is where my program just freezes at. However, I tried using this same code in a console application, and it worked just fine. What's the deal?

void got_packet(u_char *args, const struct pcap_pkthdr *header, const u_char *packet)
{
return;
}

void RawPacket::SetupFilter(pcap_if_t* Device)
{
char Error[256];
struct bpf_program fp;
char filter_exp[] = "src net 128.0.27.111";
bpf_u_int32 mask;
bpf_u_int32 net;

if (pcap_lookupnet(Device->name, &net, &mask, Error) == -1) {
fprintf(stderr, "Can't get netmask for device %s\n", Device->name);
net = 0;
mask = 0;
}

handle = pcap_open_live(Device->name, BUFSIZ, FALSE, 1000, Error);
if(!handle) {
fprintf(stderr, "Couldn't open device %s: %s\n", Device->name, Error);
return;
}

if (pcap_datalink(handle) != DLT_EN10MB) {
fprintf(stderr, "%s is not an Ethernet\n", Device->name);
return;
}

if (pcap_compile(handle, &fp, filter_exp, 0, net) == -1) {
fprintf(stderr, "Couldn't parse filter %s: %s\n", filter_exp, pcap_geterr(handle));
return;
}

if (pcap_setfilter(handle, &fp) == -1) {
fprintf(stderr, "Couldn't install filter %s: %s\n", filter_exp, pcap_geterr(handle));
return;
}

if (pcap_loop(handle, 10, got_packet, NULL) == -1) {
fprintf(stderr, "Couldn't install callback: %s\n", pcap_geterr(handle));
return;
}

pcap_freecode(&fp);
pcap_close(handle);

filterSetup = true;
}

Stack trace:
ntdll.dll!7d61c846()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
kernel32.dll!7d4d8c9e()
kernel32.dll!7d4d8c0d()
Packet.dll!00d23c3a()
wpcap.dll!10016810()
> UDP Packet Test.exe!RawPacket::SetupFilter(pcap_if * Device) Line 359 + 0x14 bytes C++

pcap library "packet" memory

The pcap loop callback routine that the libcap library uses each time it captures a packet returns a pointer to a packet that it has captured. I am a little confused as to the time period for which this "packet" memory is allocated. If I am performing calculations or even storage with each ...

PCap library issue with receive

So I've been having an issue with the receive functionality with the PCap library. I set up an echo server (outside my PC) that just takes a packet and turns it around. So, in my application, I send a packet (that works fine) and I tried receiving the response packet (from the echo server) with pcap ...

jQuery Fix for the Interface Elements library

I have a fix for the Sortables feature. Anyone know how to post a fix, as Ican't find info for reporting bugs on the site: http://interface.eyecon.ro/-Ed ...

jQuery Fix found for Interface plugin library (Sortables)

Is this the right forum to post the fix? I didn't find any contact info onthe interface site: http://interface.eyecon.ro/-Ed ...

Att: jQuery marketers - JavaScript Library discussion at WASP

Just want to point out that there is a post from Mike Davies at http://www.webstandards.org/2006/12/12/reducing-the-pain-of-adopting- a-javascript-library/ which refers to Chris Heilmann's post here http://www.wait-till-i.com/index.php?p=366 and discusses the difficulty in adopting a new JavaScr ...

jQuery a tablesorter library

http://www.javascripttoolbox.com/lib/table/. maybe some inspiration for the tabelsorter plugin guys ;)There are some nice examples on the example page.-- David Duymelinck________________david@icreate.be ...

jQuery Interface Library - What order is it built in? / bug in IE7 Draggable revert

I found an issue in the idrag.js file on line 135 of idrag.js file. Thislines:        if (elm.dragCfg.oP != 'relative' && elm.dragCfg.oP !='absolute') {            dEs.position ...

jQuery Interface Library - What order is it built in? / bug in IE7 Draggable revert

I'm resending this, since I didn't hear back. I thought maybe it got lost inthe shuffle to move to the new list.--------------------------------------------------------------------------I found an issue in the idrag.js file on line 135 of idrag.js file. Thislines:     ...

jQuery Library showdowns

<div>I started a site to expand upon the idea of the <a href="http://jquery.com/blog/2006/10/18/zebra-table-showdown/">zerba challenge</a>.</div><div><a href="http://js.commadot.com">http://js.commadot.com</a> (I decided not to regsiter <a href="http ...

The University of Murcia (Spain) takes jQuery as main JS Library for all new projects

there,recently I presented a seminar of JavaScript programming with jQueryin The University of Murcia (Spain) and the results are very good.http://www.um.es/atica/mncs/forja (sorry in *spanish*)Ours web developers will use jQuery for all new projects and integrating withthe main projects, Virtual Ca ...

jQuery library conflict

HelloI'm toying with using jQuery and prototype/scriptaculous on the same site/page.Libraries are loaded as usual in the head section, and I'm calling the jQuery cornerplug-in with:<script type="text/javascript">jQuery.noConflict();jQuery(document).ready(function($j) {$j( ...

jQuery Integrating JQeury with other library

Halo,To many of us, jquery is a swiss army knife rather than complex jslibrary such as dojo or yui.But sometimes, we really want to integrate jquery into our existinglibrary in used, e.g. YUI or home-made libraryBut we want jquery to under a specific namespace, such as YAHOO.util.jquery...something ...

jQuery main library (may be fixed?)

1) I'm just starting to use jQuery in projects but also I'm alreadyusing Jack Slockum's JSBuilder (http://code.google.com/p/js-builder).This tool makes compression of .js files and have feature of gettinall files together. So the problem is that when I made project withjQuery (unpacked) ...

jQuery .ready and javascript library loading

Does $(document).ready ensure that all javascript libraries are loaded in addition to the DOM being ready?I have a case on a very slow network connection, where a call to a library function is made seemingly before the library is loaded.~ ~ Dave ...

ImageStrip and newer jquery library

Hi,i'm using this plugin :http://blog.joshuaeichorn.com/archives/2007/01/11/jquery-image-strip/It works well with an older version of jquery (1.0.4) but when i try touse it with jquery 1.1.2, it tells me that..Erreur : this.image.left is not a functionLigne : 30Here is the line 30 :var left = th ...

Digg Moves to jQuery's JavaScript Library

Saw it on Ajax Magazine Posted by Hatem on June 23, 2007 9:04 AMOne more addition to big sites switching to my love jQuery.Congratulations jQuery community and to the dev team especially. Weall owe you a lot for your hard work.http://ajax.phpmagazine.net/2007/06/digg_moves_to_jquerys_javascri.html ...

jQuery library of common needed functions

before using prototype or such frameworks (too big!) are there any other "small" libs with common functions (extending String, Array ... ) like escapeHTML() etc.if i would have to use prototype:i tried this simple thing:<script type="text/javascript" src="prototype/protot ...

jQuery Plugin Annoucements and Additions to Plugin Library

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 11 (filtered med ...

jQuery What library to use for drag and drop?

Hello,We are starting development of an eshop that needs to be operational inOctober.For our shopping basket, we are thinking of using ajax in combination withsome drag and drop.A bit like the demo here from the interface pluginhttp://interface.eyecon.ro/demos/cart.htmlAfter reading a bit here on th ...

[New plugin] jQuery.YAV an easy web form validation using YAV library

all,I just upload of my spare times in holidays ;-) . jQuery.YAV is a new plugin withthe good things of YAV library and jQuery.Validation of Jörn Zaefferer.Some features:* Rules as class names. Set a rule class name in the field and the title and it will be validated.* Functions onError and onOk fo ...

jQuery playing with the UI library

I've been playing with the UI library a bit and I'm very impressed.Thank you for all of your hard work. I'm making a little graphingutility with resizeables and draggables just so that I can see whatthis thing can do. So far so good. I'm thrilled with what I've beenable to do eve ...

jQuery Jorn's validation library, validate against default value

all,We've got two input boxes on a form for the user to type their name in to. The client has requested "Forename" and "Surname" appear in these boxes by default as a hint to ensure they know what goes in which box.I want to validate these fields using Jorn's validation t ...

jQuery.noConflict() and the UI Library

I was kind of surprised to see that jQuery.noConflict() doesn't nothave any effect on the UI library code which is peppered with $ callsinstead of the safe jQuery explicit calls.I've experimented around with trying to get various components likethe Calendar to work with noConflict() but no l ...

Why people love the jQuery JavaScript library

Read Ben Nadel's posting title "jQuery And The Anticipation Of Greatness" (http://www.bennadel.com/index.cfm?dax=blog:997.view)Rey... ...

jQuery Strip library for certain functionality, possible?

all,As much as I love loading all of jQuery into every single web projectI'm involved in, this current one is for an iPhone catered webapplication. And to be quite blunt, loading anything over EDGE ispainful. I'd like to still use a few methods available, such asjQuery.Ajax().Is there a ...

PHP Contest Scoreboard, utilising the jQuery library

Just thought I'd post this here, I've just finished a new version ofmy contest script. You can set up questions, let users submit theiranswers, then mark it quickly and easily.The admin interface utilises the jQuery library to handle all theinteraction - adding questions, marking individual ...

jQuery + Json library = broken jQuery

everyone. This IS a potential debug issue....I'm having a real so-b of a time using jQuery with an SAjax basedlibrary I've written.Here's a basic description of the problem:When I add functions to prototypes of objects jQuery breaks - hard.I ran into a similar problem with a javascript t ...

CSS JS Library - is there a jQuery equivalent?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head></head><body bgcolor="#ffffff" text="#000000"><font face="Arial">Another sweet thing found on Ajaxian:<a class="moz-txt-link-freetext" href="http://feeds.feedburner.com/~r/ajaxian/~3/192 ...

jQuery DateJS: Robust Date manipulation library

This came through my feed reader this morning, and I thought it looked like the kind of thing jQuerians might enjoy:<a href="http://www.datejs.com/">http://www.datejs.com/</a>It's a Date library with lots of parsing capabilities and jQuery style chainable syntactic sugar. It's ~2 ...