def next_hop(tokeniser): value = tokeniser() if value.lower() == 'self': return NextHopSelf(AFI.ipv4) else: ip = IP.create(value) return NextHop(ip.top(), ip.pack())
def next_hop(tokeniser): value = tokeniser() if value.lower() == 'self': return IPSelf(tokeniser.afi), NextHopSelf(tokeniser.afi) else: ip = IP.create(value) return ip, NextHop(ip.top())
def next_hop(tokeniser): value = tokeniser() if value.lower() == 'self': return IPSelf(AFI.undefined), NextHopSelf(AFI.undefined) else: ip = IP.create(value) if ip.afi == AFI.ipv4: return ip, NextHop(ip.top()) return ip, None
def next_hop(tokeniser): value = tokeniser() if value.lower() == 'self': return NextHopSelf(AFI.ipv4) return IP.create(value)