summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp/constant.go
AgeCommit message (Collapse)Author
2017-11-28packet/bgp: Use fixed len types in FlowSpec componentsIWASE Yusuke
Currently, the "FlowSpecComponentItem" uses int type for the "Op" and "Value" fields, but Golang int type has 4 bytes length on the 32-bit env and 8 bytes length on the 64-bit env. For example, to support the SNAP (Type 20) rule, which has 5 bytes value field, int type has not enough length on 32-bit env. This patch fixes to use the fixed length integer types for the FlowSpec components and avoid overflows of value range. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-24packet/bgp: Use regexp to parse FlowSpec rulesIWASE Yusuke
Currently, the parser for the string representation of FlowSpec rules splits the given string into characters and validates them character by character. So we need to handle the unexpected white spaces carefully. This patch introduces the regular expressions to parse the FlowSpec rules and simplify the parsers. Also improves robustness for the unexpectedly inserted white spaces like "& == tcp". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-24packet/bgp: Refactor construction of FlowSpec rules stringIWASE Yusuke
This patch introduces String() functions for the flags and reserved values related to the FlowSpec rules. Also removes the unused types and functions. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-10packet: Use bitmask operand format to fragmentSatoshi Fujimoto
RFC 5575 suggests using "bitmask operand format" for fragmentation field, but GoBGP does not have an interface to configure it. This patch introduce the way to configure bitmask operands for "fragment" field. The syntax is similar to TCP flags rules. For example: =not-a-fragment =is-fragment&!last-fragment Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-07-10const: Rename TcpFlagOp to BitmaskFlagOpSatoshi Fujimoto
This flag format is not only used for "tcp-flag" field, but also "fragment" field. To express the above, this patch renames the format. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-03-02flowspec: comply with new draft RFC5575bis normalized operatorsMatthieu Texier
2017-02-17flowspec: comply with RFC 5575 about TCP flags rulesMatthieu Texier
This patch proposes a new way to configure BGP flowspec TCP flags rules It allows to comply with RFC 5575 by defining flags like this =SA =A / '!SA' / '=SA&=!U' = means match, ! means not, & means and, all TCP flags are identified by their first charater S for SYN A for Ack ...
2016-03-31move packet/*.go to packet/bgp/*.go for Go's conventionFUJITA Tomonori
Later, we move non-bgp protocol stuff like mrt under their own direcotries. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>