+/* Modes as human readable strings */
+extern const char * const iw_operation_mode[];
+#define IW_NUM_OPER_MODE 7
+#define IW_NUM_OPER_MODE_EXT 8
+
+/* Modulations as human readable strings */
+extern const struct iw_modul_descr iw_modul_list[];
+#define IW_SIZE_MODUL_LIST 16
+
+/************************* INLINE FUNTIONS *************************/
+/*
+ * Functions that are so simple that it's more efficient inlining them
+ * Most inline are private because gcc is fussy about inline...
+ */
+
+/*
+ * Note : I've defined wrapper for the ioctl request so that
+ * it will be easier to migrate to other kernel API if needed
+ */
+
+/*------------------------------------------------------------------*/
+/*
+ * Wrapper to push some Wireless Parameter in the driver
+ */
+static inline __attribute__((always_inline)) int
+iw_set_ext(int skfd, /* Socket to the kernel */
+ const char * ifname, /* Device name */
+ int request, /* WE ID */
+ struct iwreq * pwrq) /* Fixed part of the request */
+{
+ /* Set device name */
+ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ);
+ /* Do the request */
+ return(ioctl(skfd, request, pwrq));
+}
+
+/*------------------------------------------------------------------*/
+/*
+ * Wrapper to extract some Wireless Parameter out of the driver
+ */
+static inline __attribute__((always_inline)) int
+iw_get_ext(int skfd, /* Socket to the kernel */
+ const char * ifname, /* Device name */
+ int request, /* WE ID */
+ struct iwreq * pwrq) /* Fixed part of the request */
+{
+ /* Set device name */
+ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ);
+ /* Do the request */
+ return(ioctl(skfd, request, pwrq));
+}
+
+/*------------------------------------------------------------------*/
+/*
+ * Close the socket used for ioctl.
+ */
+static inline void
+iw_sockets_close(int skfd)
+{
+ close(skfd);
+}
+
+#ifdef __cplusplus
+}
+#endif