Commit f4e276ef by Juliusz Chroboczek

Rename mask_prefix to normalize_prefix.

1 parent 77204114
......@@ -117,7 +117,7 @@ network_prefix(int ae, int plen, unsigned int omitted,
return -1;
}
mask_prefix(p_r, prefix, plen < 0 ? 128 : ae == 1 ? plen + 96 : plen);
normalize_prefix(p_r, prefix, plen < 0 ? 128 : ae == 1 ? plen + 96 : plen);
return ret;
}
......
......@@ -230,8 +230,8 @@ in_prefix(const unsigned char *restrict address,
}
unsigned char *
mask_prefix(unsigned char *restrict ret,
const unsigned char *restrict prefix, unsigned char plen)
normalize_prefix(unsigned char *restrict ret,
const unsigned char *restrict prefix, unsigned char plen)
{
if(plen >= 128) {
memcpy(ret, prefix, 16);
......@@ -383,7 +383,7 @@ parse_net(const char *net, unsigned char *prefix_r, unsigned char *plen_r,
}
}
}
mask_prefix(prefix_r, prefix, plen);
normalize_prefix(prefix_r, prefix, plen);
*plen_r = plen;
if(af_r) *af_r = af;
return 0;
......
......@@ -84,9 +84,9 @@ void do_debugf(int level, const char *format, ...)
int in_prefix(const unsigned char *restrict address,
const unsigned char *restrict prefix, unsigned char plen)
ATTRIBUTE ((pure));
unsigned char *mask_prefix(unsigned char *restrict ret,
const unsigned char *restrict prefix,
unsigned char plen);
unsigned char *normalize_prefix(unsigned char *restrict ret,
const unsigned char *restrict prefix,
unsigned char plen);
const char *format_address(const unsigned char *address);
const char *format_prefix(const unsigned char *address, unsigned char prefix);
const char *format_eui64(const unsigned char *eui);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!