summaryrefslogtreecommitdiffhomepage
path: root/packet/constatnt.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-23 05:20:31 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-23 05:20:31 -0800
commitf33719f78de63f9b51d10605e99d72222410e60d (patch)
treeef668c9187abe3f36042d01d3f12321e799054a3 /packet/constatnt.go
parentcb48c082ed63590c42ff27315e583649027241e1 (diff)
packet: define FSMState
Then we can use stringer nicely. Now FSMstate shows nicely like: DEBU[0081] Peer (10.0.0.1) state changed from BGP_FSM_ACTIVE to BGP_FSM_OPENSENT Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'packet/constatnt.go')
-rw-r--r--packet/constatnt.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/packet/constatnt.go b/packet/constatnt.go
index 6f358ebe..31002c1b 100644
--- a/packet/constatnt.go
+++ b/packet/constatnt.go
@@ -19,8 +19,10 @@ const AS_TRANS = 23456
const BGP_PORT = 179
+type FSMState int
+
const (
- _ = iota
+ _ FSMState = iota
BGP_FSM_IDLE
BGP_FSM_CONNECT
BGP_FSM_ACTIVE