Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > How to write packets on ethernet card..

Reply
Thread Tools

How to write packets on ethernet card..

 
 
Stalin Thangaraj
Guest
Posts: n/a
 
      03-11-2009
Hi all,
I want to write raw packets over the Ethernet card. I don't
how to do it in ruby. If anybody knows help me..
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Gregory Brown
Guest
Posts: n/a
 
      03-11-2009
On Wed, Mar 11, 2009 at 6:48 AM, Stalin Thangaraj
<(E-Mail Removed)> wrote:
> Hi all,
> =A0 =A0 =A0 =A0 =A0I want to write raw packets over the Ethernet card. I =

don't
> how to do it in ruby. If anybody knows help me..


http://tinyurl.com/cb9p7z

When you have more specific questions, and have researched this a
little and can show what you have tried so far, post back and I'm sure
folks will help you.

-greg


--=20
Technical Blaag at: http://blog.majesticseacreature.com
Non-tech stuff at: http://metametta.blogspot.com
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpractices.com

 
Reply With Quote
 
 
 
 
Brian Candler
Guest
Posts: n/a
 
      03-11-2009
Stalin Thangaraj wrote:
> I want to write raw packets over the Ethernet card. I don't
> how to do it in ruby. If anybody knows help me..


First find out how to do it in C using the Unix sockets API. Suggested
resource is "Unix Network Programming volume 1" by Richard Stevens, pub
Addison Wesley. Or you can find existing code which sends raw packets
and reverse-engineer that. Ask questions on a kernel/networking mailing
list if you have problems.

Once you know this, you can translate easily to Ruby, since ruby's
Socket is a thin layer on top of this.

Google "ruby socket" and the first hit is the socket documentation. Also
look in the sockets documentation at
http://www.ruby-doc.org/books/ProgrammingRuby (click on "Network and Web
Libraries")
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Eleanor McHugh
Guest
Posts: n/a
 
      03-12-2009
On 11 Mar 2009, at 12:23, Brian Candler wrote:
> Stalin Thangaraj wrote:
>> I want to write raw packets over the Ethernet card. I don't
>> how to do it in ruby. If anybody knows help me..

>
> First find out how to do it in C using the Unix sockets API. Suggested
> resource is "Unix Network Programming volume 1" by Richard Stevens,
> pub
> Addison Wesley. Or you can find existing code which sends raw packets
> and reverse-engineer that. Ask questions on a kernel/networking
> mailing
> list if you have problems.
>
> Once you know this, you can translate easily to Ruby, since ruby's
> Socket is a thin layer on top of this.
>
> Google "ruby socket" and the first hit is the socket documentation.
> Also
> look in the sockets documentation at
> http://www.ruby-doc.org/books/ProgrammingRuby (click on "Network and
> Web
> Libraries")


Follow the link in my sig and you'll find some presentations bursting
with code for UDP and TCP network comms. These aren't raw packets in
the fullest sense of the term but depending on your intent they may
suffice.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
sending many packets Ethernet simultaneously sloumanaww Software 0 05-07-2011 01:41 PM
Cisco SOHO 91 Router showing Ethernet 0 instead of Fast Ethernet 0 andyr Cisco 4 04-14-2005 01:12 PM
AAUI to Ethernet vs. AUI to Ethernet tranceiver? JXM2119 Cisco 2 03-11-2005 11:13 PM
Can 803 (ISDN-ethernet) work ethernet-ethernet? Peter Cisco 2 12-11-2003 11:24 PM



Advertisments