aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25
diff options
context:
space:
mode:
Diffstat (limited to 'net/ax25')
-rw-r--r--net/ax25/ax25_addr.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/net/ax25/ax25_addr.c b/net/ax25/ax25_addr.c
index 5f0896ad0042..5524f9cb7b83 100644
--- a/net/ax25/ax25_addr.c
+++ b/net/ax25/ax25_addr.c
@@ -39,7 +39,7 @@ EXPORT_SYMBOL(null_ax25_address);
39/* 39/*
40 * ax25 -> ascii conversion 40 * ax25 -> ascii conversion
41 */ 41 */
42char *ax2asc(char *buf, ax25_address *a) 42char *ax2asc(char *buf, const ax25_address *a)
43{ 43{
44 char c, *s; 44 char c, *s;
45 int n; 45 int n;
@@ -72,7 +72,7 @@ EXPORT_SYMBOL(ax2asc);
72/* 72/*
73 * ascii -> ax25 conversion 73 * ascii -> ax25 conversion
74 */ 74 */
75void asc2ax(ax25_address *addr, char *callsign) 75void asc2ax(ax25_address *addr, const char *callsign)
76{ 76{
77 char *s; 77 char *s;
78 int n; 78 int n;
@@ -107,7 +107,7 @@ EXPORT_SYMBOL(asc2ax);
107/* 107/*
108 * Compare two ax.25 addresses 108 * Compare two ax.25 addresses
109 */ 109 */
110int ax25cmp(ax25_address *a, ax25_address *b) 110int ax25cmp(const ax25_address *a, const ax25_address *b)
111{ 111{
112 int ct = 0; 112 int ct = 0;
113 113
@@ -128,7 +128,7 @@ EXPORT_SYMBOL(ax25cmp);
128/* 128/*
129 * Compare two AX.25 digipeater paths. 129 * Compare two AX.25 digipeater paths.
130 */ 130 */
131int ax25digicmp(ax25_digi *digi1, ax25_digi *digi2) 131int ax25digicmp(const ax25_digi *digi1, const ax25_digi *digi2)
132{ 132{
133 int i; 133 int i;
134 134
@@ -149,7 +149,9 @@ int ax25digicmp(ax25_digi *digi1, ax25_digi *digi2)
149 * Given an AX.25 address pull of to, from, digi list, command/response and the start of data 149 * Given an AX.25 address pull of to, from, digi list, command/response and the start of data
150 * 150 *
151 */ 151 */
152unsigned char *ax25_addr_parse(unsigned char *buf, int len, ax25_address *src, ax25_address *dest, ax25_digi *digi, int *flags, int *dama) 152const unsigned char *ax25_addr_parse(const unsigned char *buf, int len,
153 ax25_address *src, ax25_address *dest, ax25_digi *digi, int *flags,
154 int *dama)
153{ 155{
154 int d = 0; 156 int d = 0;
155 157
@@ -204,7 +206,8 @@ unsigned char *ax25_addr_parse(unsigned char *buf, int len, ax25_address *src, a
204/* 206/*
205 * Assemble an AX.25 header from the bits 207 * Assemble an AX.25 header from the bits
206 */ 208 */
207int ax25_addr_build(unsigned char *buf, ax25_address *src, ax25_address *dest, ax25_digi *d, int flag, int modulus) 209int ax25_addr_build(unsigned char *buf, const ax25_address *src,
210 const ax25_address *dest, const ax25_digi *d, int flag, int modulus)
208{ 211{
209 int len = 0; 212 int len = 0;
210 int ct = 0; 213 int ct = 0;
@@ -261,7 +264,7 @@ int ax25_addr_build(unsigned char *buf, ax25_address *src, ax25_address *dest, a
261 return len; 264 return len;
262} 265}
263 266
264int ax25_addr_size(ax25_digi *dp) 267int ax25_addr_size(const ax25_digi *dp)
265{ 268{
266 if (dp == NULL) 269 if (dp == NULL)
267 return 2 * AX25_ADDR_LEN; 270 return 2 * AX25_ADDR_LEN;
@@ -272,7 +275,7 @@ int ax25_addr_size(ax25_digi *dp)
272/* 275/*
273 * Reverse Digipeat List. May not pass both parameters as same struct 276 * Reverse Digipeat List. May not pass both parameters as same struct
274 */ 277 */
275void ax25_digi_invert(ax25_digi *in, ax25_digi *out) 278void ax25_digi_invert(const ax25_digi *in, ax25_digi *out)
276{ 279{
277 int ct; 280 int ct;
278 281