Remove P command line option

This commit is contained in:
Job Snijders
2019-12-30 12:45:49 +00:00
parent a62f4031c4
commit e3974c5469
2 changed files with 20 additions and 33 deletions

View File

@@ -7,7 +7,7 @@ SYNOPSIS
--------
```
bgpq4 [-h host[:port]] [-S sources] [-EPz] [-f asn | -F fmt | -G asn | -t] [-2346ABbDdJjNnpsUX] [-a asn] [-r len] [-R len] [-m max] [-W len] OBJECTS [...] EXCEPT OBJECTS
bgpq4 [-h host[:port]] [-S sources] [-Ez] [-f asn | -F fmt | -G asn | -t] [-2346ABbDdJjNnpsUX] [-a asn] [-r len] [-R len] [-m max] [-W len] OBJECTS [...] EXCEPT OBJECTS
```
DESCRIPTION
@@ -46,11 +46,11 @@ Specify ASN that shall be denied in case of empty prefix-list (OpenBGPD).
#### -B
Generate output in OpenBGPD format (default: Cisco).
Generate output in OpenBGPD format.
#### -b
Generate output in BIRD format (default: Cisco).
Generate output in BIRD format.
#### -d
@@ -80,15 +80,15 @@ Host running IRRD database (default: `rr.ntt.net`).
#### -J
Generate config for Juniper (default: Cisco).
Generate config for Juniper.
#### -j
Generate output in JSON format (default: Cisco).
Generate output in JSON format.
#### -K
Generate config for MikroTik (default: Cisco).
Generate config for MikroTik.
#### -m `length`
@@ -100,11 +100,11 @@ Extra match conditions for Juniper route-filters. See the examples section.
#### -n
Generate config for Nokia SR OS (former Alcatel-Lucent) MD-CLI (default: Cisco)
Generate config for Nokia SR OS (former Alcatel-Lucent) MD-CLI.
#### -N
Generate config for Nokia SR OS (former Alcatel-Lucent) classic CLI (default: Cisco)
Generate config for Nokia SR OS (former Alcatel-Lucent) classic CLI.
#### -l `name`
@@ -120,11 +120,6 @@ is a useful feature to prevent generated filters from growing too big.
Enable use of private ASNs and ASNs used for documentation purpose only
(default: disabled).
#### -P
Generate prefix-list (default behaviour, flag added for backward compatibility
only).
#### -r `length`
Allow more-specific routes with masklen starting with specified length.
@@ -152,7 +147,7 @@ Disable pipelining. (not recommended)
#### -U
Generate output in Huawei format (default: Cisco).
Generate output in Huawei format.
#### -W `length`
@@ -160,7 +155,7 @@ Generate as-path strings of a given length maximum (0 for infinity).
#### -X
Generate config for Cisco IOS XR devices (plain IOS by default).
Generate output in Cisco IOS XR format.
#### -z

26
bgpq4.c
View File

@@ -27,13 +27,13 @@ extern int expand_special_asn;
int
usage(int ecode)
{
printf("\nUsage: bgpq4 [-h host[:port]] [-S sources] [-P|E|G <num>|f <num>|t]"
" [-2346ABbdJjKNnwXz] [-R len] <OBJECTS>...\n");
printf("\nUsage: bgpq4 [-h host[:port]] [-S sources] [-E|G <num>"
"|f <num>|t] [-2346ABbdJjKNnwXz] [-R len] <OBJECTS>...\n");
printf(" -2 : allow routes belonging to as23456 (transition-as) "
"(default: false)\n");
printf(" -3 : assume that your device is asn32-safe\n");
printf(" -4 : generate IPv4 prefix-lists (default)\n");
printf(" -6 : generate IPv6 prefix-lists (IPv4 by default)\n");
printf(" -6 : generate IPv6 prefix-lists\n");
printf(" -A : try to aggregate prefix-lists/route-filters\n");
printf(" -B : generate OpenBGPD output (Cisco IOS by default)\n");
printf(" -b : generate BIRD output (Cisco IOS by default)\n");
@@ -57,12 +57,8 @@ usage(int ecode)
printf(" -L depth : limit recursion depth (default: unlimited)\n"),
printf(" -l name : use specified name for generated access/prefix/.."
" list\n");
printf(" -N : generate config for Nokia SR OS classic CLI "
"(Cisco IOS by default)\n");
printf(" -n : generate config for Nokia SR OS MD-CLI (Cisco IOS "
"by default)\n");
printf(" -P : generate prefix-list (default, just for backward"
" compatibility)\n");
printf(" -N : generate config for Nokia SR OS classic CLI\n");
printf(" -n : generate config for Nokia SR OS MD-CLI\n");
printf(" -R len : allow more specific routes up to specified masklen\n");
printf(" -r len : allow more specific routes from masklen specified\n");
printf(" -S sources: use only specified sources (recommended:"
@@ -71,12 +67,12 @@ usage(int ecode)
printf(" -T : disable pipelining (experimental, faster mode)\n");
printf(" -t : generate as-sets for OpenBGPD (OpenBSD 6.4+), BIRD "
"and JSON formats\n");
printf(" -U : generate config for Huawei (Cisco IOS by default)\n");
printf(" -U : generate config for Huawei\n");
printf(" -W len : specify max-entries on as-path line (use 0 for "
"infinity)\n");
printf(" -w : 'validate' AS numbers: accept only ones with "
"registered routes\n");
printf(" -X : generate config for IOS XR (Cisco IOS by default)\n");
printf(" -X : generate Cisco IOS XR output\n");
printf("\n" PACKAGE_NAME " version: " PACKAGE_VERSION "\n");
exit(ecode);
};
@@ -84,7 +80,7 @@ usage(int ecode)
void
exclusive()
{
fprintf(stderr,"-E, -f <asnum>, -G <asnum>, -P and -t are mutually "
fprintf(stderr,"-E, -f <asnum>, -G <asnum>, and -t are mutually "
"exclusive\n");
exit(1);
};
@@ -146,7 +142,7 @@ main(int argc, char* argv[])
if (getenv("IRRD_SOURCES"))
expander.sources=getenv("IRRD_SOURCES");
while((c=getopt(argc,argv,"2346a:AbBdDEF:S:jJKf:l:L:m:M:NnW:Ppr:R:G:tTh:UwXsz"))
while((c=getopt(argc,argv,"2346a:AbBdDEF:S:jJKf:l:L:m:M:NnW:pr:R:G:tTh:UwXsz"))
!=EOF) {
switch(c) {
case '2':
@@ -228,10 +224,6 @@ main(int argc, char* argv[])
case 'p':
expand_special_asn=1;
break;
case 'P':
if(expander.generation) exclusive();
expander.generation=T_PREFIXLIST;
break;
case 'r':
refineLow=strtoul(optarg,NULL,10);
if(!refineLow) {