This section is empty.


This section is empty.


This section is empty.


type FuncOnLpmIP

type FuncOnLpmIP func(val interface{}) bool

    FuncOnLpmIP is the type of func which will operate on the value associated with the lpm ip.

    type FuncOnVals

    type FuncOnVals func(val interface{}) interface{}

      FuncOnVals is the type of the func which will operate on each value and will return a new value for each associated value.

      type IPcache

      type IPcache interface {
      	// Put takes an argument an ip address, mask and value.
      	Put(net.IP, int, interface{})
      	// Get takes an argument the IP address and mask and returns the value that is stored for
      	// that key.
      	Get(net.IP, int) (interface{}, bool)
      	// RunFuncOnLpmIP function takes as an argument an IP address and a function. It finds the
      	// subnet to which this IP belongs with the longest prefix match. It then calls the
      	// function supplied by the user on the value stored and if it succeeds then it returns.
      	RunFuncOnLpmIP(net.IP, FuncOnLpmIP)
      	// RunFuncOnVals takes an argument a function which is called on all the values stored in
      	// the cache. This can be used to update the old values with the new values. If the new
      	// value is nil, it will delete the key.

        IPcache is an interface which provides functionality to store ip's and do longest prefix match

        func NewIPCache

        func NewIPCache() IPcache

          NewIPCache creates an object which is implementing the interface IPcache

          Source Files