atalk.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _UAPI__LINUX_ATALK_H__
  3. #define _UAPI__LINUX_ATALK_H__
  4. #include <linux/types.h>
  5. #include <asm/byteorder.h>
  6. #include <linux/socket.h>
  7. /*
  8. * AppleTalk networking structures
  9. *
  10. * The following are directly referenced from the University Of Michigan
  11. * netatalk for compatibility reasons.
  12. */
  13. #define ATPORT_FIRST 1
  14. #define ATPORT_RESERVED 128
  15. #define ATPORT_LAST 254 /* 254 is only legal on localtalk */
  16. #define ATADDR_ANYNET (__u16)0
  17. #define ATADDR_ANYNODE (__u8)0
  18. #define ATADDR_ANYPORT (__u8)0
  19. #define ATADDR_BCAST (__u8)255
  20. #define DDP_MAXSZ 587
  21. #define DDP_MAXHOPS 15 /* 4 bits of hop counter */
  22. #define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0)
  23. struct atalk_addr {
  24. __be16 s_net;
  25. __u8 s_node;
  26. };
  27. struct sockaddr_at {
  28. __kernel_sa_family_t sat_family;
  29. __u8 sat_port;
  30. struct atalk_addr sat_addr;
  31. char sat_zero[8];
  32. };
  33. struct atalk_netrange {
  34. __u8 nr_phase;
  35. __be16 nr_firstnet;
  36. __be16 nr_lastnet;
  37. };
  38. #endif /* _UAPI__LINUX_ATALK_H__ */