home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume20 / etherlib / part01 / src / libether.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-24  |  1.3 KB  |  61 lines

  1. /* $Id: libether.h,v 2.1 89/10/23 15:42:44 dupuy Exp $ */
  2.  
  3. /* Internal definitions for ethernet access library */
  4.  
  5. #include "ether.h"            /* get interface definitions */
  6.  
  7. #define MAXNUMIF 16            /* maximum number of interfaces */
  8.  
  9. #define ETHER_BUFFERS    5        /* for socket based NIT interface */
  10. #define ETHER_BUFSIZ \
  11.  (ETHER_BUFFERS * (ETHER_PKT + ETHER_MAX + (2 * sizeof (struct nit_hdr))))
  12.  
  13. #define ALIGNSIZE    (sizeof (int))
  14. #define pad(x)        ((ALIGNSIZE - ((unsigned)(x)) % ALIGNSIZE) % ALIGNSIZE)
  15.  
  16. #define address_check(dest) \
  17.  (ETHER_MCAST (dest) \
  18.   && bcmp ((char *)(dest), (char *) ðer_bcast_addr, sizeof (ether_addr)) \
  19.   && bcmp ((char *)(dest), (char *) &_ether_multi_addrs[fd], \
  20.        sizeof (ether_addr)))
  21.  
  22. #ifdef __STDC__
  23.  
  24. extern char *malloc (unsigned size);
  25.  
  26. extern int _ether_arpscan (ether_addr *addr, struct in_addr *ipaddr);
  27. extern int _ether_localif (ether_addr *addr, struct in_addr *ipaddr);
  28. #ifdef RARP
  29. extern int _ether_rarpprobe (ether_addr *addr, struct in_addr *ipaddr);
  30. #endif
  31.  
  32. #else
  33.  
  34. #ifdef lint
  35.  
  36. #ifndef htons
  37.  
  38. extern unsigned short htons ();
  39.  
  40. #endif
  41.  
  42. #ifdef ultrix
  43.  
  44. extern void bzero ();
  45. extern void bcopy ();
  46. extern void free ();
  47. extern void perror ();
  48.  
  49. #endif
  50.  
  51. extern double *dalloc ();
  52. #define malloc dalloc
  53.  
  54. #else
  55.  
  56. extern char *malloc ();
  57.  
  58. #endif /* lint */
  59.  
  60. #endif /* __STDC__ */
  61.