Commit b88cab78 authored by David S. Miller's avatar David S. Miller

[AX25]: Put back ax25digicmp.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1cdd77fe
......@@ -238,6 +238,7 @@ extern ax25_address null_ax25_address;
extern char *ax2asc(ax25_address *);
extern ax25_address *asc2ax(char *);
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 *);
......
......@@ -120,6 +120,26 @@ int ax25cmp(ax25_address *a, ax25_address *b)
return 2; /* Partial match */
}
/*
* Compare two AX.25 digipeater paths.
*/
int ax25digicmp(ax25_digi *digi1, ax25_digi *digi2)
{
int i;
if (digi1->ndigi != digi2->ndigi)
return 1;
if (digi1->lastrepeat != digi2->lastrepeat)
return 1;
for (i = 0; i < digi1->ndigi; i++)
if (ax25cmp(&digi1->calls[i], &digi2->calls[i]) != 0)
return 1;
return 0;
}
/*
* Given an AX.25 address pull of to, from, digi list, command/response and the start of data
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment