25 lines
347 B
Go
25 lines
347 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/crip/config"
|
|
"github.com/crip/ripv2"
|
|
"github.com/crip/rtable"
|
|
)
|
|
|
|
func callback(r *ripv2.Routes) {
|
|
rtable.Add(r)
|
|
}
|
|
|
|
func main() {
|
|
config := config.Read("config.json")
|
|
rip := ripv2.New()
|
|
routes := ripv2.Init()
|
|
|
|
log.Println("Running")
|
|
routes.Timer()
|
|
rip.Run(config, callback)
|
|
/* NOT REACHED */
|
|
}
|