[26199] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8386 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 3 14:05:33 2005

Date: Sat, 3 Sep 2005 11:05:03 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 3 Sep 2005     Volume: 10 Number: 8386

Today's topics:
        How to identify which interface a broadcast packet come <junkto@tm.net.my>
        Looking for Equation Solver <no@spam>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 03 Sep 2005 18:48:17 +0800
From: Lincoln Yeoh <junkto@tm.net.my>
Subject: How to identify which interface a broadcast packet comes in on?
Message-Id: <7qvih15tljv9h36ah9pn6ksv40on14h95b@4ax.com>

Hi,

If I have a program listening on 0.0.0.0:(someport) on all interfaces,
how do I know which network interface a broadcast packet is coming in
on - assuming Linux and _many_ interfaces. And how do I set which
interface a frame will leave on, assuming I'm sending a raw frame (no
IP address, just the ethernet address).

If I use C, it seems I'm to use the IP_PKTINFO socket options,
send/recv the ancillary messages and set/check the  ipi_ifindex value.

struct in_pktinfo {
	unsigned int	ipi_ifindex; 	/* Interface index */
	struct in_addr	ipi_spec_dst;	/* Local address */
	struct in_addr	ipi_addr;	/* Header Destination address
*/
};

How would I achieve the same thing in Perl? 

This would be useful for writing something like a DHCP server - such a
server could receive packets with source IP addresses of 0.0.0.0
destined to 255.255.255.255, and will need to know which interface the
packet is coming in from AND the source ethernet (or other link layer)
address so that it can send the replies out the right interface.

Thanks!
Link.


------------------------------

Date: Sat, 03 Sep 2005 19:49:43 +0200
From: Chris <no@spam>
Subject: Looking for Equation Solver
Message-Id: <36f8$4319e21b$acb1e521$15679@news1.surfino.com>

Hi,

does anybody know a Perl program or script that is able to solve
mathematical equations. So, if I input a string, say, $e = "2x+1=5";
the output would be "x=2".

If anybody knows about a program that can do something like this, please
let me know.

Thank you,
Chris


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 8386
***************************************


home help back first fref pref prev next nref lref last post