[firefly] [PATCH 2/6] Add OFPTYPE_ROLE_STATUS message type for OpenFlow 1.4
Alexandru Copot
alex.mihai.c at gmail.com
Tue Oct 8 11:52:30 EEST 2013
Signed-off-by: Alexandru Copot <alex.mihai.c at gmail.com>
---
lib/learning-switch.c | 1 +
lib/ofp-msgs.h | 6 ++++++
lib/ofp-print.c | 2 ++
lib/rconn.c | 1 +
ofproto/ofproto.c | 1 +
5 files changed, 11 insertions(+)
diff --git a/lib/learning-switch.c b/lib/learning-switch.c
index 76ec3e1..760aaf1 100644
--- a/lib/learning-switch.c
+++ b/lib/learning-switch.c
@@ -369,6 +369,7 @@ lswitch_process_packet(struct lswitch *sw, const struct ofpbuf *msg)
case OFPTYPE_PORT_DESC_STATS_REPLY:
case OFPTYPE_ROLE_REQUEST:
case OFPTYPE_ROLE_REPLY:
+ case OFPTYPE_ROLE_STATUS:
case OFPTYPE_SET_FLOW_FORMAT:
case OFPTYPE_FLOW_MOD_TABLE_ID:
case OFPTYPE_SET_PACKET_IN_FORMAT:
diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h
index bfc84f3..949b7cf 100644
--- a/lib/ofp-msgs.h
+++ b/lib/ofp-msgs.h
@@ -226,6 +226,9 @@ enum ofpraw {
/* OFPT 1.3+ (29): struct ofp13_meter_mod, uint8_t[8][]. */
OFPRAW_OFPT13_METER_MOD,
+ /* OFPT 1.4+ (30): uint32_t, uint8_t, uint8_t[3], uint64_t, struct ofp14_role_prop_header[]. */
+ OFPRAW_OFPT14_ROLE_STATUS,
+
/* Standard statistics. */
/* OFPST 1.0+ (0): void. */
@@ -496,6 +499,9 @@ enum ofptype {
/* Meters and rate limiters configuration messages. */
OFPTYPE_METER_MOD, /* OFPRAW_OFPT13_METER_MOD. */
+ /* Controller role change event messages. */
+ OFPTYPE_ROLE_STATUS, /* OFPRAW_OFPT14_ROLE_STATUS. */
+
/* Statistics. */
OFPTYPE_DESC_STATS_REQUEST, /* OFPRAW_OFPST_DESC_REQUEST. */
OFPTYPE_DESC_STATS_REPLY, /* OFPRAW_OFPST_DESC_REPLY. */
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index 6fe1cee..0feabe1 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -2490,6 +2490,8 @@ ofp_to_string__(const struct ofp_header *oh, enum ofpraw raw,
case OFPTYPE_ROLE_REPLY:
ofp_print_role_message(string, oh);
break;
+ case OFPTYPE_ROLE_STATUS:
+ break;
case OFPTYPE_METER_STATS_REQUEST:
case OFPTYPE_METER_CONFIG_STATS_REQUEST:
diff --git a/lib/rconn.c b/lib/rconn.c
index 64cc6d0..9cf0ff9 100644
--- a/lib/rconn.c
+++ b/lib/rconn.c
@@ -1182,6 +1182,7 @@ is_admitted_msg(const struct ofpbuf *b)
case OFPTYPE_METER_FEATURES_STATS_REPLY:
case OFPTYPE_ROLE_REQUEST:
case OFPTYPE_ROLE_REPLY:
+ case OFPTYPE_ROLE_STATUS:
case OFPTYPE_SET_FLOW_FORMAT:
case OFPTYPE_FLOW_MOD_TABLE_ID:
case OFPTYPE_SET_PACKET_IN_FORMAT:
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 8e4f300..05d047c 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -5792,6 +5792,7 @@ handle_openflow__(struct ofconn *ofconn, const struct ofpbuf *msg)
case OFPTYPE_METER_CONFIG_STATS_REPLY:
case OFPTYPE_METER_FEATURES_STATS_REPLY:
case OFPTYPE_TABLE_FEATURES_STATS_REPLY:
+ case OFPTYPE_ROLE_STATUS:
default:
return OFPERR_OFPBRC_BAD_TYPE;
}
--
1.8.4
More information about the firefly
mailing list