OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.5 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../linux-header/if.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. ifmap is already defined in net/if.h - so disable most parts of the file for
  17. user-space applications.
  18. - Rene Rebe <rene@exactcode.de>
  19. --- usr/include/linux/if.h.orig 2004-10-03 22:50:13.954411344 +0200
  20. +++ usr/include/linux/if.h 2004-10-03 23:16:24.702621320 +0200
  21. @@ -26,6 +26,10 @@
  22. #define IFNAMSIZ 16
  23. #include <linux/hdlc/ioctl.h>
  24. +/* WARNING: userspace should use net/if.h, but this file may be included via
  25. + linux/mii.h as example */
  26. +#if !defined(_NET_IF_H) || !defined(__USE_MISC)
  27. +
  28. /* Standard interface flags (netdevice->flags). */
  29. #define IFF_UP 0x1 /* interface is up */
  30. #define IFF_BROADCAST 0x2 /* broadcast address valid */
  31. @@ -53,6 +57,8 @@
  32. #define IFF_802_1Q_VLAN 0x1 /* 802.1Q VLAN device. */
  33. #define IFF_EBRIDGE 0x2 /* Ethernet bridging device. */
  34. +#endif /* !(net/if.h && __USE_MISC) */
  35. +
  36. #define IF_GET_IFACE 0x0001 /* for querying only */
  37. #define IF_GET_PROTO 0x0002
  38. @@ -80,6 +86,9 @@
  39. #define IF_PROTO_FR_ETH_PVC 0x200B
  40. #define IF_PROTO_RAW 0x200C /* RAW Socket */
  41. +/* WARNING: userspace should use net/if.h, but this file may be included via
  42. + linux/mii.h as example */
  43. +#if !defined(_NET_IF_H) || !defined(__USE_MISC)
  44. /*
  45. * Device mapping structure. I'd just gone off and designed a
  46. @@ -101,6 +110,7 @@
  47. unsigned char port;
  48. /* 3 bytes spare */
  49. };
  50. +#endif /* !(net/if.h && __USE_MISC) */
  51. struct if_settings
  52. {
  53. @@ -120,6 +130,7 @@
  54. } ifs_ifsu;
  55. };
  56. +#if !defined(_NET_IF_H) || !defined(__USE_MISC)
  57. /*
  58. * Interface request structure used for socket
  59. * ioctl's. All interface ioctl's must have parameter
  60. @@ -186,8 +197,10 @@
  61. struct ifreq __user *ifcu_req;
  62. } ifc_ifcu;
  63. };
  64. +
  65. #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
  66. #define ifc_req ifc_ifcu.ifcu_req /* array of structures */
  67. +#endif /* !(net/if.h && __USE_MISC) */
  68. #endif /* _LINUX_IF_H */