diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-02-15 15:32:53 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-02-15 15:32:53 +0000 |
commit | 4f361fcb6898465e2368f2bfe15b72778ba26948 (patch) | |
tree | 68ce2cae0c458dfaf58b95a486b31df9dfe884a5 /src/ipaccess-find.c | |
parent | e1bd2412c2166c5043febb261ca132b685339715 (diff) |
* add commond header file for ipaccess protocol
* query for more attributes during ipaccess-find
Diffstat (limited to 'src/ipaccess-find.c')
-rw-r--r-- | src/ipaccess-find.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ipaccess-find.c b/src/ipaccess-find.c index de96a163c..8a11cd32d 100644 --- a/src/ipaccess-find.c +++ b/src/ipaccess-find.c @@ -10,6 +10,7 @@ #include <openbsc/select.h> #include <openbsc/timer.h> +#include <openbsc/ipaccess.h> static int udp_sock(void) { @@ -45,7 +46,18 @@ err: return rc; } -const unsigned char find_pkt[] = { 0x00, 0x0b, 0xfe, 0x00, 0x04, 0x01, 0x06, 0x01, 0x07, 0x01, 0x02, 0x01, 0x03, 0x01, 0x08 }; +const unsigned char find_pkt[] = { 0x00, 0x0b+8, IPAC_PROTO_IPACCESS, 0x00, + IPAC_MSGT_ID_GET, + 0x01, IPAC_IDTAG_MACADDR, + 0x01, IPAC_IDTAG_IPADDR, + 0x01, IPAC_IDTAG_UNIT, + 0x01, IPAC_IDTAG_LOCATION1, + 0x01, IPAC_IDTAG_LOCATION2, + 0x01, IPAC_IDTAG_EQUIPVERS, + 0x01, IPAC_IDTAG_SWVERSION, + 0x01, IPAC_IDTAG_UNITNAME, + 0x01, IPAC_IDTAG_SERNR, + }; static int bcast_find(int fd) @@ -71,7 +83,7 @@ static int parse_response(unsigned char *buf, int len) t_len = *cur++; t_tag = *cur++; - printf("tag=0x%02x, val='%s' ", t_tag, cur); + printf("tag(%02x)='%s' ", t_tag, cur); cur += t_len; } |