Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by sph147

  1. sph147

    Map Structure not Recognizing Repeat Keys

    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?
  2. sph147

    Map Structure not Recognizing Repeat Keys

    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...
  3. sph147

    Problem with locking a mutex in spawned thread

    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_ *...
  4. sph147

    Problem with locking a mutex in spawned thread

    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...
  5. sph147

    implementing timing device in loop

    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...
  6. sph147

    Problem with locking a mutex in spawned thread

    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...
  7. sph147

    Sleep Command?

    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.
  8. sph147

    Using threads and syncronization with a ring buffer

    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...
  9. sph147

    I Want the Hex, not the ASCII

    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...
  10. sph147

    I Want the Hex, not the ASCII

    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...
  11. sph147

    I Want the Hex, not the ASCII

    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??.
  12. sph147

    Obtained IP, but not right, some kind of conversion?

    I wish it would have been more complicated so I felt better about not getting it, but either way, thanks a million.
  13. sph147

    Obtained IP, but not right, some kind of conversion?

    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...
  14. sph147

    Obtaining NIC adress info

    Ok, what would be the best way to go about retrieving data about a certain network adapter such as IP, netmast, broadcast address, stuff like this???
  15. sph147

    Problem with address info &quot;Generic NdisWan Adapter&quot;, using Winpcap

    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...

Part and Inventory Search

Back
Top