crip/main.go

25 lines
363 B
Go
Raw Normal View History

2024-04-09 22:20:07 +01:00
package main
import (
2024-04-16 12:55:08 +01:00
"github.com/crip/config"
2024-04-09 22:20:07 +01:00
"github.com/crip/ripv2"
2024-04-17 20:37:48 +01:00
"github.com/crip/rtable"
2024-04-25 14:39:46 +01:00
"log"
2024-04-09 22:20:07 +01:00
)
2024-04-17 20:37:48 +01:00
func callback(r *ripv2.Routes) {
2024-04-18 14:32:35 +01:00
rtable.Pass(r)
2024-04-17 20:37:48 +01:00
}
2024-04-09 22:20:07 +01:00
func main() {
2024-04-25 14:19:28 +01:00
conf := config.Read("config.json")
2024-04-09 22:20:07 +01:00
rip := ripv2.New()
2024-04-16 12:55:08 +01:00
routes := ripv2.Init()
2024-04-09 22:20:07 +01:00
2024-04-11 21:15:36 +01:00
routes.Timer()
2024-04-25 14:39:46 +01:00
if err := rip.Run(conf, callback); err != nil {
log.Fatal(err)
}
2024-04-16 12:55:08 +01:00
/* NOT REACHED */
2024-04-09 22:20:07 +01:00
}