Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Values of Multicast Socket Options on Solaris 10 are not returned by getsockopt.

by zwon (Abbot)
on Nov 04, 2012 at 11:43 UTC ( #1002186=note: print w/replies, xml ) Need Help??


in reply to Values of Multicast Socket Options on Solaris 10 are not returned by getsockopt.

Note, that getsockopt returns packed value. Try
print "ttl => " . unpack("L", $ttl) . "\n";
instead. Also, when you're setting socket option you should pack its value.
  • Comment on Re: Values of Multicast Socket Options on Solaris 10 are not returned by getsockopt.
  • Download Code

Replies are listed 'Best First'.
Re^2: Values of Multicast Socket Options on Solaris 10 are not returned by getsockopt.
by Anonymous Monk on Nov 04, 2012 at 11:55 UTC

    thank-you.

    i came across the same solution. note that the TTL and LOOP multicast options are 1 byte long, so i had to do $ttl = unpack('C', $ttl).

    i had similar problems using IO::Socket (V1.28) and found that the unpack done in it assumed integer values when unpacking. it also did not do packing when setting values.

    in summary, i was trying to implement the IO::Socket::Multicast module as described in Network Programming with Perl by Lincoln D. Stein, 2001, found in chapter 21, page 620. but none of the examples would work. so i stepped back and tried implementing using the basic Socket module.

    now that i have this step working, i hope to make more progress.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002186]
help
Chatterbox?
[Discipulus]: but i'm also animalist, so i' hirted by 1nickt's sig: The way forward always starts with a mammal test... grin..
[erix]: I might if I did remember. It's probably somewhere in the site docs
[uhClem]: I don't favor that sort of thing around here but the place for our politics is wherever we live.
[uhClem]: And besides, the objection to it was off-topic.
[Discipulus]: 1nickt hide signature is a positive action; i think is not a solution here
[erix]: my objection to sigs is just that they take screen space. ( Some monks would have *several* slogans underneath a 1-liner reply )

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2017-06-22 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (519 votes). Check out past polls.