diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-03-03 17:50:22 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-03-03 17:50:22 -0300 | 
| commit | d4afb81972d9666d730445fa81090d711fc0d54f (patch) | |
| tree | 50eb9c287f7cb1ff7b2b0c87f03c58b29c3cb8a8 /ldpd/log.c | |
| parent | 8819fc38a0610e5828b7cc65fbbfc42e6ea1cc6a (diff) | |
ldpd: implement RFC 5918 (Typed Wildcard FEC)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/log.c')
| -rw-r--r-- | ldpd/log.c | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/ldpd/log.c b/ldpd/log.c index a02210efe4..0e85daea29 100644 --- a/ldpd/log.c +++ b/ldpd/log.c @@ -332,6 +332,23 @@ log_map(const struct map *map)  		    pw_type_name(map->fec.pwid.type)) == -1)  			return ("???");  		break; +	case MAP_TYPE_TYPED_WCARD: +		if (snprintf(buf, sizeof(buf), "typed wildcard") < 0) +			return ("???"); +		switch (map->fec.twcard.type) { +		case MAP_TYPE_PREFIX: +			if (snprintf(buf + strlen(buf), sizeof(buf) - +			    strlen(buf), " (prefix, address-family %s)", +			    af_name(map->fec.twcard.u.prefix_af)) < 0) +				return ("???"); +			break; +		default: +			if (snprintf(buf + strlen(buf), sizeof(buf) - +			    strlen(buf), " (unknown type)") < 0) +				return ("???"); +			break; +		} +		break;  	default:  		return ("???");  	}  | 
