X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fax25%2Fax25_addr.c;h=7e7964dd987bc99a311084c285ea27e225082b57;hb=061964fb988ca51087948975da66ff523b3a5852;hp=5524f9cb7b83bb53f0f905ca1adb7b66bf65f8e2;hpb=e8cc49bb0fdb9e18a99e6780073d1400ba2b0d1f;p=linux-2.6 diff --git a/net/ax25/ax25_addr.c b/net/ax25/ax25_addr.c index 5524f9cb7b..7e7964dd98 100644 --- a/net/ax25/ax25_addr.c +++ b/net/ax25/ax25_addr.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -29,11 +28,20 @@ #include /* - * The null address is defined as a callsign of all spaces with an - * SSID of zero. + * The default broadcast address of an interface is QST-0; the default address + * is LINUX-1. The null address is defined as a callsign of all spaces with + * an SSID of zero. */ -ax25_address null_ax25_address = {{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00}}; +const ax25_address ax25_bcast = + {{'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, 0 << 1}}; +const ax25_address ax25_defaddr = + {{'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, 1 << 1}}; +const ax25_address null_ax25_address = + {{' ' << 1, ' ' << 1, ' ' << 1, ' ' << 1, ' ' << 1, ' ' << 1, 0 << 1}}; + +EXPORT_SYMBOL_GPL(ax25_bcast); +EXPORT_SYMBOL_GPL(ax25_defaddr); EXPORT_SYMBOL(null_ax25_address); /* @@ -74,7 +82,7 @@ EXPORT_SYMBOL(ax2asc); */ void asc2ax(ax25_address *addr, const char *callsign) { - char *s; + const char *s; int n; for (s = callsign, n = 0; n < 6; n++) { @@ -117,10 +125,10 @@ int ax25cmp(const ax25_address *a, const ax25_address *b) ct++; } - if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E)) /* SSID without control bit */ - return 0; + if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E)) /* SSID without control bit */ + return 0; - return 2; /* Partial match */ + return 2; /* Partial match */ } EXPORT_SYMBOL(ax25cmp);