int *want_return);
static const unsigned char zeroes[20] = {0};
-static const unsigned char ones[20] = {
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF
-};
static const unsigned char v4prefix[16] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0
};
}
/* BEP-32 mandates that we should bind this socket to one of our
- global IPv6 addresses. In this simple example, this only
- happens if the user used the -b flag. */
+ global IPv6 addresses. In this program, this only happens if
+ the user used the -b flag. */
memset(&sin6, 0, sizeof(sin6));
sin6.sin6_family = AF_INET6;
unsigned short port;
unsigned char values[2048], values6[2048];
int values_len = 2048, values6_len = 2048;
- int want, want4, want6;
+ int want;
struct sockaddr_storage source_storage;
struct sockaddr *source = (struct sockaddr*)&source_storage;
socklen_t sourcelen = sizeof(source_storage);
}
}
- if(want > 0) {
- want4 = (want & WANT4);
- want6 = (want & WANT6);
- } else {
- want4 = source->sa_family == AF_INET;
- want6 = source->sa_family == AF_INET6;
- }
-
switch(message) {
case REPLY:
if(tid_len != 4) {