qeth.h 2.0 KB

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