home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 4839 next >
Encoding:
Internet Message Format  |  1992-07-20  |  1.0 KB

  1. Xref: sparky comp.lang.perl:4839 comp.sys.pyramid:167
  2. Path: sparky!uunet!darwin.sura.net!wupost!waikato.ac.nz!comp.vuw.ac.nz!cc-server4.massey.ac.nz!A.Raman
  3. Newsgroups: comp.lang.perl,comp.sys.pyramid
  4. Subject: Re: Perl4.19 setsockopt() ... Pyramid 9815 - fix
  5. Message-ID: <1992Jul21.042944.17050@massey.ac.nz>
  6. From: A.Raman@massey.ac.nz (Anand)
  7. Date: Tue, 21 Jul 92 04:29:44 GMT
  8. References: <1992Jul19.230304.1523@massey.ac.nz> <1992Jul21.002626.5432@massey.ac.nz>
  9. Organization: Massey University Computer Centre
  10. Lines: 24
  11.  
  12. Hi,
  13.  
  14. Sorry about this enormous number of repetitions.  But the second
  15. post had a correction in it.  Then I found I couldn't cancel the
  16. original one.
  17.  
  18. Anyway, here is what I found finally worked:
  19.  
  20. I needed to pack the option argument to setsockopt.
  21.  
  22. I was doing:
  23.  
  24. > setsockopt(S, &SOL_SOCKET, &SO_BROADCAST, 1);
  25.  
  26. What I needed to do was:
  27.  
  28. > setsockopt(S, &SOL_SOCKET, &SO_BROADCAST, pack("I", 1));
  29.  
  30. Why that worked on the Ultrix machine, I still don't know.  Does the
  31. Ultrix version of perl pack it for me?
  32.  
  33. Thanks to everyone who clarified this.
  34.  
  35. - &
  36.