1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

ead: add support for instance ids to prevent interference from packet reception on multiple interfaces

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13905 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd
2009-01-06 22:19:55 +00:00
parent 15f9be1011
commit 04553c0968
3 changed files with 52 additions and 39 deletions

View File

@@ -62,6 +62,7 @@ static struct t_num *A, B;
static struct t_preconf *tcp;
static int auth_type = EAD_AUTH_DEFAULT;
static int timeout = EAD_TIMEOUT;
static uint16_t sid = 0;
static void
set_nonblock(int enable)
@@ -157,6 +158,7 @@ handle_pong(void)
auth_type = ntohs(pong->auth_type);
if (nid == 0xffff)
printf("%04x: %s\n", ntohs(msg->nid), pong->name);
sid = msg->sid;
return true;
}
@@ -320,7 +322,7 @@ int main(int argc, char **argv)
int ch;
msg->magic = htonl(EAD_MAGIC);
msg->tid = 0;
msg->sid = 0;
memset(&local, 0, sizeof(local));
memset(&remote, 0, sizeof(remote));