Link to home
Start Free TrialLog in
Avatar of bertinoflex
bertinoflex

asked on

Net::RawIP, getopts.pl

what is the meaning of these lines ?Thank you


#!/usr/bin/perl

require 'getopts.pl';
use Net::RawIP;
use IO::Socket;

Getopts('s:d:p:q:w:t:');
$synPacket = new Net::RawIP;
$ackPacket = new Net::RawIP;

die "Usage $0 -s <IP source> -d <IP destination> -p <source port> -q <dest port> -w <window> -t <ttl>"
unless ($opt_s && $opt_d && $opt_p && $opt_q && $opt_w);
ASKER CERTIFIED SOLUTION
Avatar of mrh30
mrh30

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrh30
mrh30

PurplePerls: There's no guarantee that getopts.pl is the same one though.  It could be anything with the same file name.
From the upper link:
;# getopts.pl - a better getopt.pl

;# Usage:
;#      do Getopts('a:bc');  # -a takes arg. -b & -c not. Sets opt_* as a
;#                           #  side effect.

Of course you are true, it could be anything but getting options :)

I do also agree with you though - it is certainly the most likely candidate! :-)
Nothing has happened on this question in more than 7 weeks. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
split points between mrh30 and PurplePerls.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer