summaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_subr.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2015-06-24 04:23:46 +0200
committerRalf Baechle <ralf@linux-mips.org>2015-06-24 10:03:18 +0200
commite5067d7cd967cb17067de24a162306b79f432b20 (patch)
tree541f101762df32a5742bec354009986a96d8e564 /net/ax25/ax25_subr.h
parent86a981e836404006efc35881ebf3d5ae36925e82 (diff)
Import newax25-2.4.3.patch.1.bz2HEADnewax25-2.4.3-1
And cleanup the *.orig and *.rej files and whitespace errors that are part of the original patch. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'net/ax25/ax25_subr.h')
-rw-r--r--net/ax25/ax25_subr.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/net/ax25/ax25_subr.h b/net/ax25/ax25_subr.h
new file mode 100644
index 000000000..026217ae1
--- /dev/null
+++ b/net/ax25/ax25_subr.h
@@ -0,0 +1,38 @@
+#ifndef _AX25_SUBR_H
+#define _AX25_SUBR_H
+
+#include <net/ax25.h>
+#include <net/ax25dev.h>
+
+extern unsigned char *ax25_parse_addr(unsigned char*, int, ax25_pktinfo*);
+extern unsigned short ax25_calculate_t1(ax25_cb*);
+extern void ax25_return_dm(struct net_device*, ax25_pktinfo*);
+extern void ax25_tx_command(ax25_cb*, int, int);
+extern void ax25_tx_response(ax25_cb*, int, int);
+extern void ax25_clear_queues(ax25_cb*);
+extern void ax25_disconnect(ax25_cb*, int);
+extern void ax25_nr_error_recovery(ax25_cb*);
+extern void ax25_establish_data_link(ax25_cb*);
+extern void ax25_transmit_enquiry(ax25_cb*);
+extern void ax25_enquiry_response(ax25_cb*);
+extern void ax25_timeout_response(ax25_cb*);
+extern void ax25_close_socket(struct sock*, int);
+
+
+extern inline void ax25_set_cond(ax25_cb* ax25, unsigned int cond)
+{
+ ax25->condition |= cond;
+}
+
+extern inline void ax25_clr_cond(ax25_cb* ax25, unsigned int cond)
+{
+ ax25->condition &= ~cond;
+}
+
+extern inline void ax25_start_t1(ax25_cb* ax25)
+{
+ ax25_set_cond(ax25, AX25_COND_START_T1);
+ ax25->wrt_timer = 0;
+}
+
+#endif