Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Making Network packets

by admiralfreezbee (Acolyte)
on Sep 14, 2005 at 15:50 UTC ( #491911=perlquestion: print w/ replies, xml ) Need Help??
admiralfreezbee has asked for the wisdom of the Perl Monks concerning the following question:

I need to make a data packet to send over a network. All I need is the data the placing in an UDP packet is no problem. The layout of the message is
ID (1 byte) | TransID (3 bytes)
Option_ID (2 bytes) | Option_length (2 bytes)
IP_address (16 bytes)

If anyone is wondering it's a DHCPv6 reply message.
I guess I need to do this with pack but my experience with Perl is very limited. Can anyone help me?

Replies are listed 'Best First'.
Re: Making Network packets
by sgifford (Prior) on Sep 14, 2005 at 17:50 UTC
      Thanks for the tip! That helped!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://491911]
Approved by monkfan
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2016-06-28 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (356 votes). Check out past polls.