17 [[ "$V" = "must" ]] && must="$must,V"
18 [[ "$M" = "must" ]] && must="$must,M"
19 [[ "$P" = "must" ]] && must="$must,P"
20 [[ "$V" = "may" ]] && may="$may,V"
21 [[ "$M" = "may" ]] && may="$may,M"
22 [[ "$P" = "may" ]] && may="$may,P"
23 [[ "$V" = "shouldnot" ]] && shouldnot="$shouldnot,V"
24 [[ "$M" = "shouldnot" ]] && shouldnot="$shouldnot,M"
25 [[ "$P" = "shouldnot" ]] && shouldnot="$shouldnot,P"
26 [[ "$V" = "mustnot" ]] && mustnot="$mustnot,V"
27 [[ "$M" = "mustnot" ]] && mustnot="$mustnot,M"
28 [[ "$P" = "mustnot" ]] && mustnot="$mustnot,P"
29 [[ "$ENC" = "yes" ]] && enc="$enc,Y"
30 [[ "$ENC" = "no" ]] && enc="$enc,N"
32 _must=$(echo $must | cut -d',' -f2-)
33 _may=$(echo $may | cut -d',' -f2-)
34 _shouldnot=$(echo $shouldnot | cut -d',' -f2-)
35 _mustnot=$(echo $mustnot | cut -d',' -f2-)
36 _enc=$(echo $enc | cut -d',' -f2-)
38 printf "%50s %2s %10s %2s %10s %2s %10s %2s %10s %2s %10s\n" $AVP "|" $_must "|" $_may "|" $_shouldnot "|" $_mustnot "|" $_enc
42 [[ "$1" = "" ]] && _exit "Use: $0 <avps dictionary>, i.e.: $0 avps_ietf.xml"
44 BN_FILE=`basename $FILE`
45 TMP_FILE=.${BN_FILE}.tmp
47 grep "<avp name=" $FILE > $TMP_FILE
49 printf "%50s %2s %10s %2s %10s %2s %10s %2s %10s %2s %10s\n" AVP "|" Must "|" May "|" "Should Not" "|" "Must Not" "|" "May Encrypt"
50 echo "-------------------------------------------------------------------------------------------------------------------------"
54 AVP=$(echo $line | awk -F'avp name=' '{ print $2 }' | cut -d'"' -f2)
55 V=$(echo $line | awk -F'v-bit=' '{ print $2 }' | cut -d'"' -f2)
56 M=$(echo $line | awk -F'm-bit=' '{ print $2 }' | cut -d'"' -f2)
57 P=$(echo $line | awk -F'p-bit=' '{ print $2 }' | cut -d'"' -f2)
58 ENC=$(echo $line | awk -F'may-encrypt=' '{ print $2 }' | cut -d'"' -f2)