1 AT_BANNER([ofp-errors tests])
3 AT_SETUP([OFPT_ERROR with type OFPET_HELLO_FAILED - OF1.0])
4 AT_KEYWORDS([ofp-print ofp-errors])
5 AT_CHECK([ovs-ofctl ofp-print 010100170000000000000001657874726120646174610a], [0], [dnl
6 OFPT_ERROR (xid=0x0): OFPHFC_EPERM
11 AT_SETUP([OFPT_ERROR with type OFPET_HELLO_FAILED - OF1.1])
12 AT_KEYWORDS([ofp-print ofp-errors])
13 AT_CHECK([ovs-ofctl ofp-print 020100170000000000000001657874726120646174610a], [0], [dnl
14 OFPT_ERROR (OF1.1) (xid=0x0): OFPHFC_EPERM
19 AT_SETUP([OFPT_ERROR with type OFPET_BAD_REQUEST - OF1.0])
20 AT_KEYWORDS([ofp-print ofp-errors])
21 AT_CHECK([ovs-ofctl ofp-print 0101001400000000000100060105ccddeeff0011], [0], [dnl
22 OFPT_ERROR (xid=0x0): OFPBRC_BAD_LEN
23 OFPT_FEATURES_REQUEST (xid=0xeeff0011):
24 (***truncated to 8 bytes from 52445***)
25 00000000 01 05 cc dd ee ff 00 11- |........ |
29 AT_SETUP([OFPT_ERROR prints type of truncated inner messages])
30 AT_KEYWORDS([ofp-print ofp-errors])
31 AT_CHECK([ovs-ofctl ofp-print "0101004c092529d500010006 \
32 01 06 00 e0 00 00 00 01 00 00 50 54 00 00 00 01 \
33 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
34 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
35 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01"], [0], [dnl
36 OFPT_ERROR (xid=0x92529d5): OFPBRC_BAD_LEN
37 OFPT_FEATURES_REPLY (xid=0x1):
38 (***truncated to 64 bytes from 224***)
39 00000000 01 06 00 e0 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
40 00000010 00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
41 00000020 ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
42 00000030 00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
46 AT_SETUP([OFPT_ERROR with code OFPBMC_BAD_PREREQ - OF1.0])
47 AT_KEYWORDS([ofp-print ofp-errors])
48 AT_CHECK([ovs-ofctl ofp-print '0101001c55555555 b0c20000 0000232000010104 0102000811111111'], [0], [dnl
49 OFPT_ERROR (xid=0x55555555): OFPBMC_BAD_PREREQ
50 OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
54 AT_SETUP([OFPT_ERROR with code OFPBMC_BAD_PREREQ - OF1.1])
55 AT_KEYWORDS([ofp-print ofp-errors])
56 AT_CHECK([ovs-ofctl ofp-print '0201001c55555555 b0c20000 0000232000010104 0102000811111111'], [0], [dnl
57 OFPT_ERROR (OF1.1) (xid=0x55555555): OFPBMC_BAD_PREREQ
58 OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
62 dnl Error type 3, code 1 is OFPFMFC_OVERLAP in OF1.0
63 dnl and OFPBIC_UNSUP_INST in OF1.1, so check that value in both versions.
64 AT_SETUP([OFPT_ERROR with type OFPFMFC_OVERLAP - OF1.0])
65 AT_KEYWORDS([ofp-print ofp-errors])
66 AT_CHECK([ovs-ofctl ofp-print 0101001400000000000300010106ccddeeff0011], [0], [dnl
67 OFPT_ERROR (xid=0x0): OFPFMFC_OVERLAP
68 OFPT_FEATURES_REPLY (xid=0xeeff0011):
69 (***truncated to 8 bytes from 52445***)
70 00000000 01 06 cc dd ee ff 00 11- |........ |
73 AT_SETUP([OFPT_ERROR with type OFPBIC_UNSUP_INST - OF1.1])
74 AT_KEYWORDS([ofp-print ofp-errors])
75 AT_CHECK([ovs-ofctl ofp-print 0201001400000000000300010206ccddeeff0011], [0], [dnl
76 OFPT_ERROR (OF1.1) (xid=0x0): OFPBIC_UNSUP_INST
77 OFPT_FEATURES_REPLY (OF1.1) (xid=0xeeff0011):
78 (***truncated to 8 bytes from 52445***)
79 00000000 02 06 cc dd ee ff 00 11- |........ |
83 dnl OF1.1 had OFPBIC_UNSUP_EXP_INST as 3,5.
84 dnl OF1.2 broke it into OFPBIC_BAD_EXPERIMENTER as 3,5
85 dnl and OFPBIC_BAD_EXT_TYPE as 3,6.
86 dnl Thus, for OF1.1 we translate both of the latter error codes into 3,5.
87 AT_SETUP([encoding OFPBIC_* experimenter errors])
88 AT_KEYWORDS([ofp-print ofp-errors])
89 AT_CHECK([ovs-ofctl print-error OFPBIC_BAD_EXPERIMENTER], [0], [dnl
94 AT_CHECK([ovs-ofctl print-error OFPBIC_BAD_EXP_TYPE], [0], [dnl
101 AT_SETUP([decoding OFPBIC_* experimenter errors])
102 AT_KEYWORDS([ofp-print ofp-errors])
103 AT_CHECK([ovs-ofctl ofp-print '0201001455555555 00030005 0102000811111111'], [0], [dnl
104 OFPT_ERROR (OF1.1) (xid=0x55555555): OFPBIC_BAD_EXPERIMENTER
105 OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
107 AT_KEYWORDS([ofp-print ofp-errors])
108 AT_CHECK([ovs-ofctl ofp-print '0301001455555555 00030005 0102000811111111'], [0], [dnl
109 OFPT_ERROR (OF1.2) (xid=0x55555555): OFPBIC_BAD_EXPERIMENTER
110 OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
112 AT_KEYWORDS([ofp-print ofp-errors])
113 AT_CHECK([ovs-ofctl ofp-print '0301001455555555 00030006 0102000811111111'], [0], [dnl
114 OFPT_ERROR (OF1.2) (xid=0x55555555): OFPBIC_BAD_EXP_TYPE
115 OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload