home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume20 / etherlib / part01 / src / etheraddr.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-24  |  755 b   |  38 lines

  1. /* $Id: etheraddr.c,v 2.1 89/10/23 15:44:44 dupuy Exp $ */
  2.  
  3. /*
  4.  * Static initialization of ethernet broadcast address.     We do it in a separate
  5.  * file so that it can be compiled with -R (read-only), but more importatntly,
  6.  * so that we can get around the restriction on initializing unions if needed.
  7.  */
  8.  
  9. #ifdef __STDC__
  10.  
  11. #include "ether.h"
  12.  
  13. ether_addr ether_bcast_addr = {{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }};
  14.  
  15. #else
  16.  
  17. #ifdef lint
  18.  
  19. #include "ether.h"
  20.  
  21. ether_addr ether_bcast_addr;        /* a little white lie */
  22.  
  23. #else
  24.  
  25. #define __ETHER_BCAST_ADDR__        /* avoid conflict with ether.h */
  26.  
  27. #include "ether.h"
  28.  
  29. struct ether_addr
  30. {
  31.     unsigned short shorts[3];        /* must have short alignment */
  32. }
  33. ether_bcast_addr =  {{ 0xffff, 0xffff, 0xffff }};
  34.  
  35. #endif
  36.  
  37. #endif
  38.