Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: pcap and Libnet

From: Carsten Doh <NO(at)SPAM.securityfocus.com>
Date: Mon Jan 06 2003 - 10:15:03 EST

Hello Lone,
i see two ways for your task. The first way is to use libnet, here is a code snippet from one of my programs:

// payload of cgmp packet
u_char llc_cgmp_payload [] =
{

	0xaa, 0xaa, 0x03, 0x00, 0x00, 0x0c, 0x20, 0x01,		// LLC
	0x10, 							// CGMP, Version 1, Join
	0x00, 0x00, 0x01,					// # entries
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00,			// GDA
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00			// own mac address
};

...

     		packet_cgmp_t = libnet_build_ethernet(
	            dst_mac,                                /* ethernet 
destination */
         	    mac_struct->ether_addr_octet,           /* ethernet source */
	            0x0018,                                 /* protocol type */
	            llc_cgmp_payload,                       /* payload */
	            sizeof(llc_cgmp_payload),               /* payload size */
	            packet_cgmp,                            /* libnet handle */
	            0);                                     /* libnet id */

The second way is to use linkcat, a tool from Paketto Keiretsu by Dan Kaminski, available at www.doxpara.com.

Hope this helps.
Carsten
(c a r s t e n (at) f a m i l i e - d o h (dot) de)

Lone Sumd schrieb:
>
> Is there a way to send a packet that was sniffed with pcap using libnet.



To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com For additional commands, e-mail: libnet-help@securityfocus.com Received on Mon Jan 6 10:15:28 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:22 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library