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

  1. /* $Id: nit4self.c,v 2.0 89/10/20 19:02:46 dupuy Exp $ */
  2.  
  3. #include <sys/sockio.h>            /* SIOCGETFDSTAT */
  4.  
  5. /*
  6.  * No standard sun ethernet interface loops back packets.  Early versions of
  7.  * the streams-based Sun NIT interface don't loopback broadcast packets, but
  8.  * 4.0.3 and later appear to (although 4.0.3 has bugs).     Since a 4.0 compiled
  9.  * binary will run on a 4.0.3 system, we can't determine the answer correctly
  10.  * at compile time.  Since there doesn't seem to be any kernel feature present
  11.  * in 4.0.3 and absent in earlier versions that we can test for, we use a
  12.  * compile-time check.    It's the best we can do for now.
  13.  */
  14.  
  15. /* ARGSUSED */
  16.  
  17. int
  18. ether_send_self (fd)
  19. int fd;
  20. {
  21.     return (0);
  22. }
  23.  
  24. /* ARGSUSED */
  25.  
  26. int
  27. ether_mcast_self (fd)
  28. int fd;
  29. {
  30.     return (0);
  31. }
  32.  
  33. /* ARGSUSED */
  34.  
  35. int
  36. ether_bcast_self (fd)
  37. int fd;
  38. {
  39. #ifdef SIOCGETFDSTAT
  40.     return (1);
  41. #else
  42.     return (0);
  43. #endif
  44. }
  45.