Perl Module for Sockets that can Mark DSCP

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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
    3. 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...
    4. 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...
    5. DSCP, socket
      nobody can help?
  3. #2

    Default 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:
    > 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. 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

  4. #3

    Default Re: Perl Module for Sockets that can Mark DSCP


    Jim Gibson wrote:
    > 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.
    That's way too high level.

    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

  5. #4

    Default 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

  6. #5

    Default Re: Perl Module for Sockets that can Mark DSCP

    "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


    Scott \(Scooter\) McHugh Guest

  7. #6

    Default Re: Perl Module for Sockets that can Mark DSCP

    Scott (Scooter) McHugh wrote:
    > "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
    >
    >
    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
    [url]http://chronos-tachyon.net/[/url]
    Donald King Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139