* generating ethernet packets @ 2003-12-30 14:35 Massimiliano Cialdi 2003-12-31 4:37 ` syedk 2003-12-31 7:01 ` Progga 0 siblings, 2 replies; 7+ messages in thread From: Massimiliano Cialdi @ 2003-12-30 14:35 UTC (permalink / raw) To: linux-c-programming I need to generate custom ethernet packets. I want to test a protocol. How can I send my custom ethernet packets through the network? Do I need libpcap? thanks -- Massimiliano Cialdi cialdi@firenze.net m.cialdi@oksys.it ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: generating ethernet packets 2003-12-30 14:35 generating ethernet packets Massimiliano Cialdi @ 2003-12-31 4:37 ` syedk 2003-12-31 13:47 ` Massimiliano Cialdi 2003-12-31 7:01 ` Progga 1 sibling, 1 reply; 7+ messages in thread From: syedk @ 2003-12-31 4:37 UTC (permalink / raw) To: Massimiliano Cialdi; +Cc: linux-c-programming u can find a tool named nemesis in packetfactory.net.. after installing it u can generate custom ethernet traffic. If u want to do it on your own u can use raw sockets. otherwise u can use libnet luv and seasons greetings Syed SK On Tue, 2003-12-30 at 20:05, Massimiliano Cialdi wrote: > I need to generate custom ethernet packets. I want to test a protocol. > How can I send my custom ethernet packets through the network? Do I need libpcap? > > thanks > > -- > Massimiliano Cialdi > cialdi@firenze.net > m.cialdi@oksys.it > - > To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: generating ethernet packets 2003-12-31 4:37 ` syedk @ 2003-12-31 13:47 ` Massimiliano Cialdi 2004-01-05 3:58 ` James Stevenson 0 siblings, 1 reply; 7+ messages in thread From: Massimiliano Cialdi @ 2003-12-31 13:47 UTC (permalink / raw) To: linux-c-programming; +Cc: syedk On 31 Dec 2003 10:07:57 +0530 syedk <syedk@intotoinc.com> wrote: > If u want to do it on your own u can use raw sockets. How can I generate an ethernet frame (with custom payload) with raw sockets? thanks -- Massimiliano Cialdi cialdi@firenze.net m.cialdi@oksys.it ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: generating ethernet packets 2003-12-31 13:47 ` Massimiliano Cialdi @ 2004-01-05 3:58 ` James Stevenson 2004-01-06 11:30 ` Massimiliano Cialdi 0 siblings, 1 reply; 7+ messages in thread From: James Stevenson @ 2004-01-05 3:58 UTC (permalink / raw) To: Massimiliano Cialdi; +Cc: linux-c-programming, syedk > > If u want to do it on your own u can use raw sockets. > How can I generate an ethernet frame (with custom payload) with raw sockets? Open a raw socket using the socket function. Then use write to put the packet on the wire. iirc there are 100's of example on doing this James ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: generating ethernet packets 2004-01-05 3:58 ` James Stevenson @ 2004-01-06 11:30 ` Massimiliano Cialdi 2004-01-07 9:22 ` Jan-Benedict Glaw 0 siblings, 1 reply; 7+ messages in thread From: Massimiliano Cialdi @ 2004-01-06 11:30 UTC (permalink / raw) To: linux-c-programming; +Cc: James Stevenson, syedk On Mon, 5 Jan 2004 03:58:32 +0000 (GMT) James Stevenson <james@stev.org> wrote: > > How can I generate an ethernet frame (with custom payload) with raw sockets? > Open a raw socket using the socket function. Which parameters do I need to pass to socket()? > Then use write to put the packet on the wire. How can I be sure that the datas will go on eth0 and not on ppp0? > iirc there are 100's of example on doing this where are all these examples? it is also possible to generate an ethernet frame with wrong crc? thanks -- Massimiliano Cialdi cialdi@firenze.net m.cialdi@oksys.it ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: generating ethernet packets 2004-01-06 11:30 ` Massimiliano Cialdi @ 2004-01-07 9:22 ` Jan-Benedict Glaw 0 siblings, 0 replies; 7+ messages in thread From: Jan-Benedict Glaw @ 2004-01-07 9:22 UTC (permalink / raw) To: linux-c-programming [-- Attachment #1: Type: text/plain, Size: 1210 bytes --] On Tue, 2004-01-06 12:30:19 +0100, Massimiliano Cialdi <cialdi@firenze.net> wrote in message <20040106123019.76fd7d22.cialdi@firenze.net>: > On Mon, 5 Jan 2004 03:58:32 +0000 (GMT) > James Stevenson <james@stev.org> wrote: > > iirc there are 100's of example on doing this > where are all these examples? Mailing lists aren't for saving you from asking some search engines. Try this and read the first 20 hits. http://www.google.de/search?hl=de&ie=UTF-8&oe=UTF-8&q=linux+socket+send+raw+ethernet&btnG=Google+Suche&meta= > it is also possible to generate an ethernet frame with wrong crc? Don't *ask*! That's something that you can easily try after getting your basic program ready. Just prepare a wrongly CRCed frame and try to send it. While doing so, let a tcpdump run on the local machine as well as on some remote machine. Oh, and results may be surprising. MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)); [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: generating ethernet packets 2003-12-30 14:35 generating ethernet packets Massimiliano Cialdi 2003-12-31 4:37 ` syedk @ 2003-12-31 7:01 ` Progga 1 sibling, 0 replies; 7+ messages in thread From: Progga @ 2003-12-31 7:01 UTC (permalink / raw) To: Massimiliano Cialdi; +Cc: linux-c-programming On Tue, Dec 30, 2003 at 03:35:02PM +0100, Massimiliano Cialdi wrote: > I need to generate custom ethernet packets. I want to test a protocol. > How can I send my custom ethernet packets through the network? Do I need libpcap? Probably, the combination of ping's "-p" and "-s" option can send custom packets. Khoda Hafez Progga ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-01-07 9:22 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-12-30 14:35 generating ethernet packets Massimiliano Cialdi 2003-12-31 4:37 ` syedk 2003-12-31 13:47 ` Massimiliano Cialdi 2004-01-05 3:58 ` James Stevenson 2004-01-06 11:30 ` Massimiliano Cialdi 2004-01-07 9:22 ` Jan-Benedict Glaw 2003-12-31 7:01 ` Progga
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).