Ask a Question related to PERL Modules, Design and Development.
-
Scott \(Scooter\) McHugh #1
Perl Module for Sockets that can Mark DSCP
Hey all,
I am new to modules as I have only used perl on Solaris to call external
executeables and write log files. I am really a Network Engineer that has
been saddled with running Openview on Solaris to manage VoIP.
What I want to do is create a client app and a server app that sends IP
traffic to each other but would allow me to pass in QoS/ToS values as well
as port numbers. This will be used for testing in my lab
Bassically I want to create traffic to go through a few hops and will be
able to test out Cisco routers and how they react to the packets that are
marked for queing and of course use perl to mark the packets.
TIA
Scott \(Scooter\) McHugh Guest
-
Top Level Name for Perl Module
Hello, I have a perl module that facilitates file downloads. Researchers often need to download some files off the web on daily bases. These... -
Perl sockets on an HPUX
Great where do I get this IO::Socket module? thank you Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams -
Large File transfers using sockets in Perl or any method if available
I am working out to develop client server application using perl. Client & Server commuicate using sockets. server executes a query and the o/p is... -
DSCP
Hi, I've spent much time but couldn't reach what I want to do :( I get the packets to a socket which I create and then I want to set DSCP in the... -
DSCP, socket
nobody can help? -
Jim Gibson #2
Re: Perl Module for Sockets that can Mark DSCP
In article <b6T3g.13092$i41.1973@newsread1.news.atl.earthlink .net>,
Scooter\ <smchugh@bahamamama.com> wrote:
While perl has socket functions built-in, you should look into using> Hey all,
> I am new to modules as I have only used perl on Solaris to call external
> executeables and write log files. I am really a Network Engineer that has
> been saddled with running Openview on Solaris to manage VoIP.
>
> What I want to do is create a client app and a server app that sends IP
> traffic to each other but would allow me to pass in QoS/ToS values as well
> as port numbers. This will be used for testing in my lab
>
> Bassically I want to create traffic to go through a few hops and will be
> able to test out Cisco routers and how they react to the packets that are
> marked for queing and of course use perl to mark the packets.
the IO::Socket module and its derivative IO::Socket::Inet. Also look at
the Perl documentation 'perldoc perlipc'.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
[url]http://www.usenet.com[/url]
Jim Gibson Guest
-
Brian McCauley #3
Re: Perl Module for Sockets that can Mark DSCP
Jim Gibson wrote:That's way too high level.> In article <b6T3g.13092$i41.1973@newsread1.news.atl.earthlink .net>,
> Scooter\ <smchugh@bahamamama.com> wrote:
>>> > Hey all,
> > I am new to modules as I have only used perl on Solaris to call external
> > executeables and write log files. I am really a Network Engineer that has
> > been saddled with running Openview on Solaris to manage VoIP.
> >
> > What I want to do is create a client app and a server app that sends IP
> > traffic to each other but would allow me to pass in QoS/ToS values as well
> > as port numbers. This will be used for testing in my lab
> >
> > Bassically I want to create traffic to go through a few hops and will be
> > able to test out Cisco routers and how they react to the packets that are
> > marked for queing and of course use perl to mark the packets.
> While perl has socket functions built-in, you should look into using
> the IO::Socket module and its derivative IO::Socket::Inet.
You may be able to manipulate ToS with something like
setsockopt($socket, SOL_IP, IP_TOS, IPTOS_LOWDELAY);
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.
My answer is based on Linux - ymmv.
Brian McCauley Guest
-
Scott \(Scooter\) McHugh #4
Re: Perl Module for Sockets that can Mark DSCP
Thanks guys! I am new to this stuff I know what I need to do just don't
have a budget to spend on a vendor tool.
This is really cool. Got a udp flood perl script to work today!
Scott \(Scooter\) McHugh Guest
-
Scott \(Scooter\) McHugh #5
Re: Perl Module for Sockets that can Mark DSCP
"Brian McCauley" <nobull67@gmail.com> wrote in message
Ughhh sorry but I am really a newbie. How do I grab them from the C header> 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.
files? I have googled for this but I am just really lost.
TIA
Scott \(Scooter\) McHugh Guest
-
Donald King #6
Re: Perl Module for Sockets that can Mark DSCP
Scott (Scooter) McHugh wrote:
Assuming you have the C header files installed, the following command> "Brian McCauley" <nobull67@gmail.com> 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
>
>
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
[url]http://chronos-tachyon.net/[/url]
Donald King Guest



Reply With Quote

