Click here to Skip to main content
15,904,497 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRemoving directories Pin
Brian Delahunty9-Apr-03 4:07
Brian Delahunty9-Apr-03 4:07 
GeneralRe: Removing directories Pin
Rickard Andersson209-Apr-03 5:26
Rickard Andersson209-Apr-03 5:26 
GeneralRe: Removing directories Pin
Brian Delahunty9-Apr-03 5:31
Brian Delahunty9-Apr-03 5:31 
GeneralHtml Edit Control Notification Pin
Atlence9-Apr-03 3:50
Atlence9-Apr-03 3:50 
GeneralRe: Html Edit Control Notification Pin
Atlence19-Apr-03 8:25
Atlence19-Apr-03 8:25 
GeneralMFC Pin
frackasse9-Apr-03 2:30
frackasse9-Apr-03 2:30 
GeneralRe: MFC Pin
Cedric Moonen9-Apr-03 2:41
Cedric Moonen9-Apr-03 2:41 
Generalwinpcap handle problem Pin
summo9-Apr-03 2:15
summo9-Apr-03 2:15 
Suspicious | :suss: In the code below packet_handler function is not the member of the
class I want to display the data generating from this function to be displayed on the list box. But handle to the list box is not there as is not the member of the class.
Is there any way I can get handle of listbox into the function p_h
below.
It is important the funtion declaration of "paket_handler" is defined in the library file so the return type or parameter cannot change.

//defined in winpcap library

void sniff::OnButton1() {
pcap_loop(adhandle, 0, packet_handler, NULL);//call to the call back //packet_handler function
}


void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
{
ih = (ip_header *) (pkt_data + 14); //length of ethernet header

ip_len = (ih->ver_ihl & 0xf) * 4;
......//more code
......
/* print ip addresses and udp ports */
printf("%d.%d.%d.%d -> %d.%d.%d.%d\n",
ih->saddr.byte1,ih->saddr.byte2,ih->saddr.byte3,ih->saddr.byte4,

ih->daddr.byte1,ih->daddr.byte2,ih->daddr.byte3,ih->daddr.byte4);

}

Reply me soon
GeneralCreateThread / ExitThread Pin
Paul Farry9-Apr-03 2:03
professionalPaul Farry9-Apr-03 2:03 
GeneralRe: CreateThread / ExitThread Pin
Zdeslav Vojkovic9-Apr-03 2:35
Zdeslav Vojkovic9-Apr-03 2:35 
GeneralTransfer of a SDI application to MDI Pin
Claude Gagnon9-Apr-03 1:38
Claude Gagnon9-Apr-03 1:38 
GeneralDao problem Pin
naradaji9-Apr-03 1:27
naradaji9-Apr-03 1:27 
GeneralRe: Dao problem Pin
G. Steudtel9-Apr-03 23:43
G. Steudtel9-Apr-03 23:43 
GeneralRe: Dao problem Pin
naradaji9-Apr-03 23:58
naradaji9-Apr-03 23:58 
Generaltype cast problem when going from VS6->VS.NET Pin
Mathias S.9-Apr-03 0:43
Mathias S.9-Apr-03 0:43 
GeneralRe: type cast problem when going from VS6->VS.NET Pin
jhwurmbach9-Apr-03 1:13
jhwurmbach9-Apr-03 1:13 
GeneralRe: type cast problem when going from VS6->VS.NET Pin
Mathias S.9-Apr-03 1:26
Mathias S.9-Apr-03 1:26 
GeneralRe: type cast problem when going from VS6->VS.NET Pin
Mathias S.9-Apr-03 1:29
Mathias S.9-Apr-03 1:29 
GeneralRe: type cast problem when going from VS6->VS.NET : Solved . maybe Pin
Mathias S.9-Apr-03 1:53
Mathias S.9-Apr-03 1:53 
GeneralBlinking Object Pin
SatyaDY9-Apr-03 0:31
SatyaDY9-Apr-03 0:31 
GeneralRe: Blinking Object Pin
Roger Allen9-Apr-03 3:05
Roger Allen9-Apr-03 3:05 
GeneralAsynchronously inserting large number of items into TreeView Pin
henchook8-Apr-03 23:44
henchook8-Apr-03 23:44 
GeneralRe: Asynchronously inserting large number of items into TreeView Pin
valikac9-Apr-03 11:35
valikac9-Apr-03 11:35 
GeneralRe: Asynchronously inserting large number of items into TreeView Pin
henchook9-Apr-03 20:29
henchook9-Apr-03 20:29 
QuestionHowto set the dropped height of a combobox? Pin
Brian van der Beek8-Apr-03 23:38
Brian van der Beek8-Apr-03 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.