|
|
@ -518,6 +518,12 @@ static bool cidr_howmany(struct cidr *a, struct cidr *b)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool cidr_prefix(struct cidr *a, struct cidr *b)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
a->prefix = b->prefix;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static bool cidr_quiet(struct cidr *a)
|
|
|
|
static bool cidr_quiet(struct cidr *a)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
quiet = true;
|
|
|
|
quiet = true;
|
|
|
@ -545,6 +551,11 @@ struct op ops[] = {
|
|
|
|
.desc = "Turn base address into broadcast address",
|
|
|
|
.desc = "Turn base address into broadcast address",
|
|
|
|
.f4.a1 = cidr_broadcast4 },
|
|
|
|
.f4.a1 = cidr_broadcast4 },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ .name = "prefix",
|
|
|
|
|
|
|
|
.desc = "Set the prefix of base address to argument",
|
|
|
|
|
|
|
|
.f4.a2 = cidr_prefix,
|
|
|
|
|
|
|
|
.f6.a2 = cidr_prefix },
|
|
|
|
|
|
|
|
|
|
|
|
{ .name = "netmask",
|
|
|
|
{ .name = "netmask",
|
|
|
|
.desc = "Print netmask of base address, does not change base address",
|
|
|
|
.desc = "Print netmask of base address, does not change base address",
|
|
|
|
.f4.a1 = cidr_netmask4 },
|
|
|
|
.f4.a1 = cidr_netmask4 },
|
|
|
|