Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.protocols.tcp-ip    |    TCP and IP network protocols.    |    14,669 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 13,117 of 14,669    |
|    Jorgen Grahn to lancer6238@yahoo.com    |
|    Re: Prepend Ethernet header    |
|    15 Oct 09 07:20:33    |
      d97d8dbe       From: grahn+nntp@snipabacken.se              On Thu, 2009-10-15, lancer6238@yahoo.com wrote:       > Is it also possible to create a new packet using libpcap?              And before that you wrote:       > I do need a link-layer frame.       >       > So I can simply prepend a dummy 14-byte Ethernet header to the IP       > packet and the entire packet can be read by tools like wireshark?              Please quote properly -- it makes life easier for whoever wants to help.              Yes, to both questions.              When you use libpcap, you just read packets as octet buffers, and you       also write them as octet buffers. You can put anything in there -- as       long as it matches the pcap file's link layer type (if the file claims       to be DLT_EN10MB, there must be an Ethernet header and so on). See the       pcap(3) man page for details.              /Jorgen              --        // Jorgen Grahn |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca