Juniper/contrail-vrouter — pull request #30 by divakardhar (2014-02-20 08:52:28+00:00)
Title: Changing the NH utility for options

NH utility is changed like below.

# nh
Usage: --list
--get
--help

--list Lists All Nexthops
--get Displays nexthop corresponding to
--help Displays this help message

Usage with exampls:
-------------------

1) nh --list lists all nexthops

nh --list

Id:000 Type:Drop Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:1

Id:001 Type:Resolve Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:235

Id:002 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:1
EncapFmly:0806 Oif:0 Len:14 Data:00 00 00 00 00 01 00 25 90 c3 08 82 08 00

Id:003 Type:Receieve Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:4
Oif:1

Id:004 Type:Receieve Fmly: AF_INET Flags:Valid, Policy, Rid:0 Ref_cnt:1
Oif:1

Id:005 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:767
EncapFmly:0806 Oif:2 Len:14 Data:2c 21 72 a0 4a 80 00 25 90 c3 08 82 08 00

Id:006 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:2
EncapFmly:0806 Oif:2 Len:14 Data:00 25 90 c3 0a f6 00 25 90 c3 08 82 08 00

Id:007 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:2
EncapFmly:0806 Oif:2 Len:14 Data:00 25 90 c4 81 ae 00 25 90 c3 08 82 08 00

Id:008 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:2
EncapFmly:0806 Oif:2 Len:14 Data:00 25 90 c4 7a 70 00 25 90 c3 08 82 08 00

Id:009 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:2
EncapFmly:0806 Oif:2 Len:14 Data:00 25 90 c4 7a 9e 00 25 90 c3 08 82 08 00

Id:010 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:2
EncapFmly:0806 Oif:2 Len:14 Data:00 25 90 c3 3f 3c 00 25 90 c3 08 82 08 00

Id:011 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:2
EncapFmly:0806 Oif:2 Len:14 Data:00 25 90 c5 59 b0 00 25 90 c3 08 82 08 00

Id:012 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:2
EncapFmly:0806 Oif:2 Len:14 Data:00 25 90 c4 84 be 00 25 90 c3 08 82 08 00

2) nh --get Displays a particular nexthop

nh --get 15

Id:015 Type:Encap Fmly: AF_INET Flags:Valid, Rid:0 Ref_cnt:2
EncapFmly:0806 Oif:2 Len:14 Data:00 25 90 c3 ae b4 00 25 90 c3 08 82 08 00

nh --get 3000
Error No such file or directory in kernel operation

3) nh --help Lists the all above options

nh --help
Usage: --list
--get
--help

--list Lists All Nexthops
--get Displays nexthop corresponding to
--help Displays this help message