Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. pcap problem

pcap problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    styve
    wrote on last edited by
    #1

    Hi! Having problem with my program. I'm looking up the device, but it will not be found. I'm trying to different ways. I know I have a device. With Tcpdump I can sniff packets at eth0. But my own program do not work. Does anyone know why it do not work? Thanksful for your help, Stefan My code: #include #include int main() { char *dev, *device, errbuf[PCAP_ERRBUF_SIZE]; pcap_t *kkk; dev = pcap_lookupdev(errbuf); kkk = pcap_open_live(device, 128, 0, 100, errbuf); printf("Device1: %s\n", dev); printf("Device2: %s\n", kkk); return 0; }

    T 1 Reply Last reply
    0
    • S styve

      Hi! Having problem with my program. I'm looking up the device, but it will not be found. I'm trying to different ways. I know I have a device. With Tcpdump I can sniff packets at eth0. But my own program do not work. Does anyone know why it do not work? Thanksful for your help, Stefan My code: #include #include int main() { char *dev, *device, errbuf[PCAP_ERRBUF_SIZE]; pcap_t *kkk; dev = pcap_lookupdev(errbuf); kkk = pcap_open_live(device, 128, 0, 100, errbuf); printf("Device1: %s\n", dev); printf("Device2: %s\n", kkk); return 0; }

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      sorry, can't help you man, you're too less precise please - give more details (like what you excpect exactly, and what it does instead), - be more "readable" (colors, indentations, useful & logical variable names...) - be careful to the < and > html tags delimiters when you write a C header... (your #include don't appear) ;) i wish i'll be able to help you, but you have to help me too... ps:what is pcap ? TOXCCT

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups