Link to home
Start Free TrialLog in
Avatar of onimenokyo
onimenokyo

asked on

Linux pakets programming

First, i d like to say hi to the staff,
and thank every expert who share their knowledge with us!

I just registered and i already have a question lol

I m not a newbie in C but when it comes to packets programming...i m lost!
I d like to create a tool (in C) that can send custom packets through the net..
But i need someone to show me some code with little comments if possible.
I ve seen many sources about packets but i need explainations,or a good old faq!

That would help ! thanks.
Avatar of arn0ld
arn0ld

i assume you mean sockets/ip. If you know perl, its easier to  
 do sockets programming. Otherwise,
man socket + man the "See Also's"

of course, google:
   linux socket tutorial

which  found the following, from this forum:

 garboua 08/14/2002 08:23AM PST

   ................................
tutorial with excellent examples and tips
http://www.ecst.csuchico.edu/~beej/guide/net/
or go to www.piratehaven.org and check em OUT.
Avatar of onimenokyo

ASKER


Ok thanx but i ll be more accurate in my question :

I already know sys/socket but i need a simple example about netinet/ip_icmp, ip__udp and netdb.
I ve learned what IHL,TOS,ID,DF... are but i couldn t find out how to declare them.(i ve tryed to explore the "hping" sources but it s not that simple! lol)
I know a bit of perl since it s quite close to C, so should i code my net-tools with it?

The one who can find me a good link or post a little example gets the points!
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of keramati_h
keramati_h

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yah i ve found many useful tips using "sock_raw flag" as a keyword in my search.
I ve also read the packet and socket man pages and i just finished my first packet_maker
coded in C.

Thank u all.
(the points are for keramati_h)
humm...(packet_maker + ethereal = surprise! lol)