Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43887
b: refs/heads/master
c: e8cc49b
h: refs/heads/master
i:
  43885: e6c8120
  43883: e148c36
  43879: c35e2f5
  43871: 367d2cf
v: v3
  • Loading branch information
Ralf Baechle authored and David S. Miller committed Dec 9, 2006
1 parent 7dda9b0 commit 1497bf9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c1bbcc8836358294c431e0c09e85e3480895659
refs/heads/master: e8cc49bb0fdb9e18a99e6780073d1400ba2b0d1f
18 changes: 10 additions & 8 deletions trunk/include/net/ax25.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,16 @@ extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *);

/* ax25_addr.c */
extern ax25_address null_ax25_address;
extern char *ax2asc(char *buf, ax25_address *);
extern void asc2ax(ax25_address *addr, char *callsign);
extern int ax25cmp(ax25_address *, ax25_address *);
extern int ax25digicmp(ax25_digi *, ax25_digi *);
extern unsigned char *ax25_addr_parse(unsigned char *, int, ax25_address *, ax25_address *, ax25_digi *, int *, int *);
extern int ax25_addr_build(unsigned char *, ax25_address *, ax25_address *, ax25_digi *, int, int);
extern int ax25_addr_size(ax25_digi *);
extern void ax25_digi_invert(ax25_digi *, ax25_digi *);
extern char *ax2asc(char *buf, const ax25_address *);
extern void asc2ax(ax25_address *addr, const char *callsign);
extern int ax25cmp(const ax25_address *, const ax25_address *);
extern int ax25digicmp(const ax25_digi *, const ax25_digi *);
extern const unsigned char *ax25_addr_parse(const unsigned char *, int,
ax25_address *, ax25_address *, ax25_digi *, int *, int *);
extern int ax25_addr_build(unsigned char *, const ax25_address *,
const ax25_address *, const ax25_digi *, int, int);
extern int ax25_addr_size(const ax25_digi *);
extern void ax25_digi_invert(const ax25_digi *, ax25_digi *);

/* ax25_dev.c */
extern ax25_dev *ax25_dev_list;
Expand Down
19 changes: 11 additions & 8 deletions trunk/net/ax25/ax25_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ EXPORT_SYMBOL(null_ax25_address);
/*
* ax25 -> ascii conversion
*/
char *ax2asc(char *buf, ax25_address *a)
char *ax2asc(char *buf, const ax25_address *a)
{
char c, *s;
int n;
Expand Down Expand Up @@ -72,7 +72,7 @@ EXPORT_SYMBOL(ax2asc);
/*
* ascii -> ax25 conversion
*/
void asc2ax(ax25_address *addr, char *callsign)
void asc2ax(ax25_address *addr, const char *callsign)
{
char *s;
int n;
Expand Down Expand Up @@ -107,7 +107,7 @@ EXPORT_SYMBOL(asc2ax);
/*
* Compare two ax.25 addresses
*/
int ax25cmp(ax25_address *a, ax25_address *b)
int ax25cmp(const ax25_address *a, const ax25_address *b)
{
int ct = 0;

Expand All @@ -128,7 +128,7 @@ EXPORT_SYMBOL(ax25cmp);
/*
* Compare two AX.25 digipeater paths.
*/
int ax25digicmp(ax25_digi *digi1, ax25_digi *digi2)
int ax25digicmp(const ax25_digi *digi1, const ax25_digi *digi2)
{
int i;

Expand All @@ -149,7 +149,9 @@ int ax25digicmp(ax25_digi *digi1, ax25_digi *digi2)
* Given an AX.25 address pull of to, from, digi list, command/response and the start of data
*
*/
unsigned char *ax25_addr_parse(unsigned char *buf, int len, ax25_address *src, ax25_address *dest, ax25_digi *digi, int *flags, int *dama)
const unsigned char *ax25_addr_parse(const unsigned char *buf, int len,
ax25_address *src, ax25_address *dest, ax25_digi *digi, int *flags,
int *dama)
{
int d = 0;

Expand Down Expand Up @@ -204,7 +206,8 @@ unsigned char *ax25_addr_parse(unsigned char *buf, int len, ax25_address *src, a
/*
* Assemble an AX.25 header from the bits
*/
int ax25_addr_build(unsigned char *buf, ax25_address *src, ax25_address *dest, ax25_digi *d, int flag, int modulus)
int ax25_addr_build(unsigned char *buf, const ax25_address *src,
const ax25_address *dest, const ax25_digi *d, int flag, int modulus)
{
int len = 0;
int ct = 0;
Expand Down Expand Up @@ -261,7 +264,7 @@ int ax25_addr_build(unsigned char *buf, ax25_address *src, ax25_address *dest, a
return len;
}

int ax25_addr_size(ax25_digi *dp)
int ax25_addr_size(const ax25_digi *dp)
{
if (dp == NULL)
return 2 * AX25_ADDR_LEN;
Expand All @@ -272,7 +275,7 @@ int ax25_addr_size(ax25_digi *dp)
/*
* Reverse Digipeat List. May not pass both parameters as same struct
*/
void ax25_digi_invert(ax25_digi *in, ax25_digi *out)
void ax25_digi_invert(const ax25_digi *in, ax25_digi *out)
{
int ct;

Expand Down

0 comments on commit 1497bf9

Please sign in to comment.