igrock has asked for the wisdom of the Perl Monks concerning the following question:

Hi all.
Using pppd i saw messages:

 
> Serial connection established.
> using channel 12
> Using interface ppp0
> Connect: ppp0 <--> /dev/modem
> sent LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x6e1dbdc3> > <pcomp> <accomp>
> rcvd LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x6e1dbdc3> > <pcomp> <accomp>
> ...
How can i create raw ppp link and send my own ppp LCP/IPCP frames with perl?

I know about Net::Packet::PPP and even about
Net::Packet::PPPLCP, but their man's says:
"This modules implements the encoding and decoding of the Point-to-Point Protocol layer."

Am i able to do what i want or perl cant do this?
Thanks.

Replies are listed 'Best First'.
Re: PPP LCP/IPCP frames injecting =)
by Corion (Patriarch) on Oct 11, 2010 at 07:10 UTC

    I would assume that once you have the appropriate packet constructed, sending it is just a matter of writing the data to the appropriate device (or interface). I would try /dev/ppp0 in your case. Alternatively, you have to find out how Linux does this and then syscall the appropriate kernel function or ioctl the appropriate device.