ec.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Definitions for use with Linux AF_ECONET sockets.
  2. Copyright (C) 1998 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _NETECONET_EC_H
  16. #define _NETECONET_EC_H 1
  17. #include <features.h>
  18. #include <bits/sockaddr.h>
  19. struct ec_addr
  20. {
  21. unsigned char station; /* Station number. */
  22. unsigned char net; /* Network number. */
  23. };
  24. struct sockaddr_ec
  25. {
  26. __SOCKADDR_COMMON (sec_);
  27. unsigned char port; /* Port number. */
  28. unsigned char cb; /* Control/flag byte. */
  29. unsigned char type; /* Type of message. */
  30. struct ec_addr addr;
  31. unsigned long cookie;
  32. };
  33. #define ECTYPE_PACKET_RECEIVED 0 /* Packet received */
  34. #define ECTYPE_TRANSMIT_STATUS 0x10 /* Transmit completed */
  35. #define ECTYPE_TRANSMIT_OK 1
  36. #define ECTYPE_TRANSMIT_NOT_LISTENING 2
  37. #define ECTYPE_TRANSMIT_NET_ERROR 3
  38. #define ECTYPE_TRANSMIT_NO_CLOCK 4
  39. #define ECTYPE_TRANSMIT_LINE_JAMMED 5
  40. #define ECTYPE_TRANSMIT_NOT_PRESENT 6
  41. #endif