Re: Perl Module for Sockets that can Mark DSCP
- From: Donald King <dlking@xxxxxxxx>
- Date: Wed, 03 May 2006 08:34:41 -0500
Scott (Scooter) McHugh wrote:
"Brian McCauley" <nobull67@xxxxxxxxx> wrote in message
But note the constants SOL_IP, IP_TOS and IPTOS_LOWDELAY are probably
not in the Socket module so you'll hace to grab them out of the C
header files yourself.
Ughhh sorry but I am really a newbie. How do I grab them from the C header files? I have googled for this but I am just really lost.
TIA
Assuming you have the C header files installed, the following command ought to find what you're looking for:
find /usr/include -name "*.h" -type f | \
xargs grep '\<\(SOL_IP\|IP_TOS\|IPTOS_LOWDELAY\)\>'
For instance, I dredge up the following on Debian Linux:
#define SOL_IP 0
#define IP_TOS 1
#define IPTOS_LOWDELAY 0x10
The equivalent Perl code is:
use constant SOL_IP => 0;
use constant IP_TOS => 1;
use constant IPTOS_LOWDELAY => 0x10;
--
Donald King, a.k.a. Chronos Tachyon
http://chronos-tachyon.net/
.
- References:
- Re: Perl Module for Sockets that can Mark DSCP
- From: Scott \(Scooter\) McHugh
- Re: Perl Module for Sockets that can Mark DSCP
- Prev by Date: Re: Custom PM Modules Won't Work
- Next by Date: Re: match nested tags
- Previous by thread: Re: Perl Module for Sockets that can Mark DSCP
- Next by thread: Custom PM Modules Won't Work
- Index(es):