aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Ortiz <samuel@sortiz.org>2007-07-02 22:54:18 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-10 22:16:43 -0700
commit89da1ecf5483e6aa29b456a15ad6d05a6797c5a5 (patch)
treef9c6305e9c230f90e9cc2f862527eb8943a9e89c /include
parent8c644623fe7e41f59fe97cdf666cba3cb7ced7d8 (diff)
[IrDA]: Netlink layer.
First IrDA configuration netlink layer implementation. Currently, we only support the set/get mode commands. Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/irda.h27
-rw-r--r--include/net/irda/irda.h3
-rw-r--r--include/net/irda/irlap.h2
3 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/irda.h b/include/linux/irda.h
index 945ba311087..35911bd4dbe 100644
--- a/include/linux/irda.h
+++ b/include/linux/irda.h
@@ -216,6 +216,33 @@ struct if_irda_req {
#define ifr_dtr ifr_ifru.ifru_line.dtr
#define ifr_rts ifr_ifru.ifru_line.rts
+
+/* IrDA netlink definitions */
+#define IRDA_NL_NAME "irda"
+#define IRDA_NL_VERSION 1
+
+enum irda_nl_commands {
+ IRDA_NL_CMD_UNSPEC,
+ IRDA_NL_CMD_SET_MODE,
+ IRDA_NL_CMD_GET_MODE,
+
+ __IRDA_NL_CMD_AFTER_LAST
+};
+#define IRDA_NL_CMD_MAX (__IRDA_NL_CMD_AFTER_LAST - 1)
+
+enum nl80211_attrs {
+ IRDA_NL_ATTR_UNSPEC,
+ IRDA_NL_ATTR_IFNAME,
+ IRDA_NL_ATTR_MODE,
+
+ __IRDA_NL_ATTR_AFTER_LAST
+};
+#define IRDA_NL_ATTR_MAX (__IRDA_NL_ATTR_AFTER_LAST - 1)
+
+/* IrDA modes */
+#define IRDA_MODE_PRIMARY 0x1
+#define IRDA_MODE_SECONDARY 0x2
+
#endif /* KERNEL_IRDA_H */
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 36bee441aa5..08387553b57 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -125,6 +125,9 @@ extern void irda_sysctl_unregister(void);
extern int irsock_init(void);
extern void irsock_cleanup(void);
+extern int irda_nl_register(void);
+extern void irda_nl_unregister(void);
+
extern int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *ptype,
struct net_device *orig_dev);
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h
index a3d370efb90..9d0c78ea92f 100644
--- a/include/net/irda/irlap.h
+++ b/include/net/irda/irlap.h
@@ -208,6 +208,8 @@ struct irlap_cb {
int xbofs_delay; /* Nr of XBOF's used to MTT */
int bofs_count; /* Negotiated extra BOFs */
int next_bofs; /* Negotiated extra BOFs after next frame */
+
+ int mode; /* IrLAP mode (primary, secondary or monitor) */
};
/*