Ok, I see what everyone is saying. So I'm converting about a million things over to using strings now, but I still have to retrieve information in u_char* form. Any easy way to put the info in a u_char* to a string?
I'm using a bunch of layed maps to try and store information about some network traffic in a packet sniffing application. For example if I have 4 packets going from 192.1.1.1 from port 1 to 255.255.255.255 port 2 the structure should store the IPs and Ports as Keys and the data should be the...
Well I tried a new solution, made everything in my ring class static. So now it compiles no problem. But when I try to run it i get a linking error for each static variable in the class, for example....
error LNK2001: unresolved external symbol "public: static struct pthread_cond_t_ *...
Well I may have figured out part of the problem. The function accessing the mutex was static, while the mutex itself was not. If I make the member function non-static, it presents a new problem. When I attempt to call it during pthread_create, it says that paramater is wrong.
this is my call...
What I really need is a way to have a loop run for one hour, then reset and begin again. How would I use some kind of timing device and what type of files do I need to include? This portion of my program is intended for windows. Any help or finger points in a right direction or website would...
The program I'm writing is pulling packets from a network connection. Then i'm using a simple ring buffer and threads to pass the info to a buffer and pull them off and do work. The ring class (which is templated) has a member mutex. When get get function (which is taking from the ring and is...
Does anyone know how to use some kind of a sleep command in windows, or what include files I would need? I'm trying to use it for debugging purposes. Thanks a lot.
OK, the basic setup of this project is basically one function that is pulling information from a hardware device when its available in the form of a large character array and then processing that information. The problem is that i can't do too much processing because i don't want to miss any...
Thanks again, I think i can see where you're coming from. What I did was a little different. I'm not sure how the *u_char is storing them, but when I
cout<<dec<<u_char[i]<<" "
in a for loop so i can see each individual integer stored, i get numbers between 0 and 255 (0xff) which makes...
Actually i got it working with a little of both solutions.
(in a for loop with control i)
cout<<hex<<(int)myvalue[i]
Thanks for both, but now i have a new problem too.
I'm basically looking at packets and want to be able to tell that it is an IP protocol packet, so it should have the hex...
I'm reading in a *u_char that should be a bunch of hexidecimal flags and then outputing using cout<<. And low and behold, it wants to give me lots of ascii characters. How do I get the cout<< operator to stop converting to ascii and leave them how they are??.
I get information about an Ethernet device on my computer using a function call that returns a sockaddr* struct. when i output the sa_data in that struct and expect to get my IP (should be a 192.x.x.x cause i'm off a local switch) and my netmask, i'm getting numbers like
"1694607552" for IP...
Ok, i'm writing an application on my windowsXP using winpcap and i can detect two network adapters, my NIC, and some "NPF_GenericNdisWanAdapter Generic NdisWan adapter" when i try to retrieve the devicelist->addr information from it, it comes back as a null pointer. What is this adaper, and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.