home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / apollo / 3131 < prev    next >
Encoding:
Text File  |  1992-07-28  |  1.3 KB  |  40 lines

  1. Newsgroups: comp.sys.apollo
  2. Path: sparky!uunet!caen!afgun
  3. From: afgun@engin.umich.edu (Andrew F. Gunnesch)
  4. Subject: Need asknode_$info help
  5. Message-ID: <RHV-VC#@engin.umich.edu>
  6. Date: Tue, 28 Jul 92 16:27:18 EDT
  7. Organization: CAEN, University of Michigan
  8. Followup-To: comp.sys.apollo
  9. Nntp-Posting-Host: beck.engin.umich.edu
  10. Lines: 28
  11.  
  12. #include <stdio.h>
  13. #include "/us/ins/ubase.ins.c"
  14. #include "/us/ins/asknode.ins.c"
  15.  
  16. main()
  17. {
  18.     network_t    mynetwork;
  19.     status_$t    status;
  20.  
  21.  
  22.     asknode_$info(ask_network_number, (node_t)0, 0, &mynetwork, status);
  23.                     /* Ask the node it's network number */
  24.     if (status.all != status_$ok) 
  25.         fprintf(stderr, "Get network request failed.\n");
  26.     else
  27.         printf("%lX\n", mynetwork);
  28. }
  29.  
  30. Here's a little bit of code.  From ubase.ins.c, network_t is typedef'ed to
  31. an unsigned long.  The network number that I get back SHOULD be 29cf7, but
  32. it varies, and starts with 760.  Eg, several different runs produced either
  33. 7600aca4 or 760de310.  What am I doing wrong here?
  34.  
  35. -- 
  36. ===============================================================================
  37. Andrew F. Gunnesch          |  Evil CAEN sysadmin   |  I'm a Sun worshipper
  38. afgun@caen.engin.umich.edu  |What?  I just work here|  not a DEC dog.......
  39. ===============================================================================
  40.