qeth.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * include/asm-s390/qeth.h
  3. *
  4. * ioctl definitions for qeth driver
  5. *
  6. * Copyright (C) 2004 IBM Corporation
  7. *
  8. * Author(s): Thomas Spatzier <tspat@de.ibm.com>
  9. *
  10. */
  11. #ifndef __ASM_S390_QETH_IOCTL_H__
  12. #define __ASM_S390_QETH_IOCTL_H__
  13. #include <linux/types.h>
  14. #include <linux/ioctl.h>
  15. #define SIOC_QETH_ARP_SET_NO_ENTRIES (SIOCDEVPRIVATE)
  16. #define SIOC_QETH_ARP_QUERY_INFO (SIOCDEVPRIVATE + 1)
  17. #define SIOC_QETH_ARP_ADD_ENTRY (SIOCDEVPRIVATE + 2)
  18. #define SIOC_QETH_ARP_REMOVE_ENTRY (SIOCDEVPRIVATE + 3)
  19. #define SIOC_QETH_ARP_FLUSH_CACHE (SIOCDEVPRIVATE + 4)
  20. #define SIOC_QETH_ADP_SET_SNMP_CONTROL (SIOCDEVPRIVATE + 5)
  21. #define SIOC_QETH_GET_CARD_TYPE (SIOCDEVPRIVATE + 6)
  22. struct qeth_arp_cache_entry {
  23. __u8 macaddr[6];
  24. __u8 reserved1[2];
  25. __u8 ipaddr[16]; /* for both IPv4 and IPv6 */
  26. __u8 reserved2[32];
  27. } __attribute__ ((packed));
  28. struct qeth_arp_qi_entry7 {
  29. __u8 media_specific[32];
  30. __u8 macaddr_type;
  31. __u8 ipaddr_type;
  32. __u8 macaddr[6];
  33. __u8 ipaddr[4];
  34. } __attribute__((packed));
  35. struct qeth_arp_qi_entry7_short {
  36. __u8 macaddr_type;
  37. __u8 ipaddr_type;
  38. __u8 macaddr[6];
  39. __u8 ipaddr[4];
  40. } __attribute__((packed));
  41. struct qeth_arp_qi_entry5 {
  42. __u8 media_specific[32];
  43. __u8 macaddr_type;
  44. __u8 ipaddr_type;
  45. __u8 ipaddr[4];
  46. } __attribute__((packed));
  47. struct qeth_arp_qi_entry5_short {
  48. __u8 macaddr_type;
  49. __u8 ipaddr_type;
  50. __u8 ipaddr[4];
  51. } __attribute__((packed));
  52. /*
  53. * can be set by user if no "media specific information" is wanted
  54. * -> saves a lot of space in user space buffer
  55. */
  56. #define QETH_QARP_STRIP_ENTRIES 0x8000
  57. #define QETH_QARP_REQUEST_MASK 0x00ff
  58. /* data sent to user space as result of query arp ioctl */
  59. #define QETH_QARP_USER_DATA_SIZE 20000
  60. #define QETH_QARP_MASK_OFFSET 4
  61. #define QETH_QARP_ENTRIES_OFFSET 6
  62. struct qeth_arp_query_user_data {
  63. union {
  64. __u32 data_len; /* set by user space program */
  65. __u32 no_entries; /* set by kernel */
  66. } u;
  67. __u16 mask_bits;
  68. char *entries;
  69. } __attribute__((packed));
  70. #endif /* __ASM_S390_QETH_IOCTL_H__ */