




已阅读5页,还剩17页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
OpenFlow1.0消息格式总结NEU_张旭OpenFlow1.0消息格式总结:Controller OpenvswitchOFPT_HELLO OFPT_HELLOOFPT_ERROR OFPT_ERROROFPT_ECHO_REQUEST OFPT_ECHO_REPLYOFPT_VENDOR OFPT_VENDOROFPT_FEATURES_REQUEST OFPT_FEATURES_REPLYOFPT_GET_CONFIG_REQUEST OFPT_GET_CONFIG_REPLYOFPT_SET_CONFIGOFPT_PACKET_OUTOPPT_FLOW_MODOFPT_PORT_MOD OFPT_PACKET_IN OFPT_FLOW_REMOVED OFPT_PORT_STATUSOFPT_STATS_REQUEST OFPT_STATS_REPLYOFPT_QUEUE_GET_CONFIG_REQUEST OFPT_QUEUE_GET_CONFIG_REPLYOFPT_BARRIER_REQUEST OFPT_BARRIER_REPLYofp_header1、OFPT_FEATURES_REQUEST(8B)消息格式versiontypelength xiduint8_t version: OFP_VERSIONuint8_t type: One of the OFPT_ constantsuint16_t length: Length including this ofp_headeruint32_t xid: Transaction id associated with this packet.Replies use the same id as was in the request to facilitate pairing2、OFPT_FEATURES_REPLY(32B)=ofp_switch_featuresversiontypeofp_headerlengthxiddatapath_idn_buffersn_tablespad0pad1pad2capabilitiesactionsport_noofp_phy_porthw_addr nameconfigstatecurradvertisedsupportedpeeruint64_t datapath_id: Datapath unique ID.The lower 48-bits are for a MAC address, while the upper 16-bits are implementer-defineduint32_t n_buffers: Max packets buffered at onceuint8_t n_tables: Number of tables supported by datapathuint32_t capabilities: Bitmap of support ofp_capabilitiesuint32_t actions: Bitmap of supported ofp_action_typeuint16_t port_no:标明绑定到物理接口的datapath值uint8_t hw_addr6:该物理接口的mac地址char name16:该接口的名称字符串Null-terminated uint32_t config:Bitmap of OFPPC_* flagsuint32_t state:Bitmap of OFPPS_* flagsuint32_t curr:Current featuresuint32_t advertised:Features being advertised by the port uint32_t supported:Features supported by the portuint32_t peer:Features advertised by peer3、OFPT_GET_CONFIG_REQUEST(8B)versiontypeofp_headerlength xid4、OFPT_SET_CONFIG(12B)=ofp_switch_config OFPT_GET_CONFIG_REPLY(12B)versiontypeofp_headerlength xidflagsmiss_send_lenuint16_t flags: OFPC_* flagsuint16_t miss_send_len: Max bytes of new flow that datapath should send to the controller5、OFPT_PACKET_OUT(16B)versiontypeofp_headerlength xidbuffer_idin_portactions_lentypeofp_action_headerlenpad0pad1pad2pad3data0uint32_t buffer_id: ID assigned by datapath (-1 if none)uint16_t in_port: Packets input port (OFPP_NONE if none)uint16_t actions_len: Size of action array in bytesuint16_t type: One of OFPAT_*.uint16_t len: Length of action,including this header.This is the length of action,including any padding to make it 64-bit aligneduint8_t data0: Packet data.The length is inferred from the length field in the header.(Only meaningful if buffer_id = -1.)在这里总结所有类型的action ,我认为对于OFPT_PACKET_OUT应该用ofp_action_output来替换ofp_action_headerofp_action_output(8B)typeofp_action_outputlenportmax_lenuint16_t type: OFPAT_OUTPUTuint16_t len: Length is 8uint16_t port: Output portuint16_t max_len: Max length to send to controllerofp_action_vlan_vidofp_action_vlan_vid(8B)typelenvlan_vidpad0pad1uint16_t type: OFPAT_SET_VLAN_VIDuint16_t len: Length is 8uint16_t vlan_vid: VLAN idofp_action_vlan_pcpofp_action_vlan_pcp(8B)typelenvlan_pcppad0pad1pad2uint16_t type: OFPAT_SET_VLAN_PCPuint16_t len: Length is 8uint8_t vlan_pcp: VLAN priorityofp_action_dl_addrofp_action_dl_addr(16B)typelendl_addr6pad0pad1pad2pad3pad4pad5uint16_t type: OFPAT_SET_DL_SRC/DSTuint16_t len: Length is 16uint8_t dl_addr6: Ethernet addressofp_action_nw_addrofp_action_nw_addr(8B)typelennw_addruint16_t type: OFPAT_SET_TW_SRC/DSTuint16_t len: Length is 8uint32_t nw_addr: IP addressofp_action_tp_portofp_action_tp_port(8B)typelentp_portpad0pad1uint16_t type: OFPAT_SET_TP_SRC/DSTuint16_t len: Length is 8uint16_t tp_port: TCP/UDP portofp_action_nw_tosofp_action_nw_tos(8B)typelennw_tospad0pad1pad2uint16_t type: OFPAT_SET_TW_SRC/DSTuint16_t len: Length is 8uint8_t nw_tos: IP ToS (DSCP field, 6 bits)ofp_action_enqueueofp_action_enqueue(16B)typelenportpad0pad1pad2pad3pad4pad5queue_iduint16_t type: OFPAT_ENQUEUEuint16_t len: Length is 16uint16_t port: Port that queue belongs. Should refer to a valid physical port(i.e. OFPP_MAX) or OFPP_IN_PORTuint32_t queue_id: Where to enqueue the packetsofp_action_vendor_headerofp_action_vendor_header(8B)typelenvendoruint16_t type: OFPAT_VENDORuint16_t len: Length is a multiple of 8uint32_t vendor: Vendor ID, which takes the same form as in struct ofp_vendor_header6、OFPT_PORT_MOD(32B)versiontypeofp_headerlengthxidport_nohw_addrconfigmaskadvertisepad0pad1pad2pad3uint16_t port_no: 标明绑定到物理接口的datapath值uint8_t hw_addr6: The hardware address is not configurable.This is used to sanity-check the request, so it must be the same as returned in an ofp_phy_port structuint32_t config: Bitmap of OFPPC_* flagsuint32_t mask: Bitmap of OFPPC_* flags to be changeduint32_t advertise: Bitmap of ofp_port_featuress.Zero all bits to prevent any action taking place7、OFPT_FLOW_MOD(72B)versiontypeofp_headerlengthxidofp_match(40B)wildcardsin_portdl_srcdl_dstdl_vlandl_vlan_pcppad0dl_typenw_tosnw_protopad0pad1nw_srcnw_dsttp_srctp_dstcookiecommandidle_timeouthard_timeoutprioritybuffer_idout_portflagstypeofp_actions_headerlenpad0pad1pad2pad3uint32_t wildcards: Wildcard fieldsuint16_t in_port: Input switch portuint8_t dl_src6: Ethernet source addressuint8_t dl_dst6: Ethernet destination addressuint16_t dl_vlan: Input VLAN iduint8_t dl_vlan_pcp: Input VLAN priorityuint16_t dl_type: Ethernet frame typeuint8_t nw_tos: IP ToS (actually DSCP field, 6 bits)uint8_t nw_proto: IP protocol or lower 8 bits of ARP opcodeuint32_t nw_src: IP source addressuint32_t nw_dst: IP destination addressuint16_t tp_src: TCP/UDP source portuint16_t tp_dst: TCP/UDP destination portuint64_t cookie: Opaque controller-issued identifieruint16_t command: One of OFPFC_*uint16_t idle_timeout: Idle time before discarding secondsuint16_t hard_timeout: Max time before discarding secondsuint16_t priority: Priority level of flow entryuint32_t buffer_id: Buffered packet to apply to (or -1)Not meaningful for OFPFC_DELETE*uint16_t out_port: For OFPFC_DELETE* commands, require matching entries to include this as an output port. A value of OFPP_NONE indicates no restrictionuint16_t flags: One of OFPFF_*8、OFPT_FLOW_REMOVED(88B)versiontypeofp_headerlengthxidofp_match(40B)wildcardsin_portdl_srcdl_dstdl_vlandl_vlan_pcppad0dl_typenw_tosnw_protopad0pad1nw_srcnw_dsttp_srctp_dstcookiepriorityreasonpad0duration_secduration_nsecidle_timeoutpad0pad1packet_countbyte_countuint64_t cookie: Opaque controller-issued identifieruint16_t priority: Priority level of flow entryuint8_t reason: One of OFPRR_*uint32_t duration_sec: Time flow was alive in secondsuint32_t duration_nsec: Time flow was alive in nanoseconds beyond duration_secuint16_t idle_timeout: Idle timeout from original flow moduint64_t packet_count:计数与该流表项相关的包信息uint64_t byte_count:计数与该流表项相关的流量信息9、OFPT_PORT_STATUS(64B)versiontypeofp_headerlengthxidreasonpad0pad1pad2pad3pad4pad5pad6port_noofp_phy_port(48B)hw_addrnameconfigstatecurradvertisedsupportedpeeruint8_t reason: One of OFPPR_*10、OFPT_PACKET_IN(20B)versiontypeofp_headerlengthxidbuffer_idtotal_lenin_portreasonpaddata0uint32_t buffer_id: ID assigned by datapathuint16_t total_len: Full length of frameuint16_t in_port: Port on which frame was receiveduint8_t reason: Reason packet is being sent (one of OFPR_*)uint8_t data0: Ethernet frame,halfway through 32-bit word,so the IP header is 32-bit aligned.The amount of data is inferred from the length field in the header.Because of padding,offsetof(struct ofp_packet_in, data) = sizeof(struct ofp_packet_in) - 2.11、OFPT_QUEUE_GET_CONFIG_REQUEST(12B)versiontypeofp_headerlength xidportpad0pad1uint16_t port: Port to be queried. Should refer to a valid physical port (i.e. OFPP_MAX)12、OFPT_QUEUE_GET_CONFIG_REPLY(16B)versiontypeofp_headerlength xidportpad0pad1pad2pad3pad4pad5ofp_packet_queue(8B)queue_idlenpad0ofp_queue_prop_header(8B)pad1propertylenpad0pad1pad2pad3uint32_t queue_id: id for the specific queueuint16_t len: Length in bytes of this queue descuint16_t property: One of OFPQT_uint16_t len
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 婚介师基础考核试卷及答案
- 金属文物修复师综合考核试卷及答案
- 化学镀银工标准化作业考核试卷及答案
- 拜耳法溶出工技术考核试卷及答案
- 共享经济下租赁行业的法律法规研究-洞察及研究
- 新能源行业2025年智能电网安全生产标准化建设实践报告
- 炉外精炼工三级安全教育(班组级)考核试卷及答案
- 加氢稳定装置操作工基础知识考核试卷及答案
- 云技术在影视制作中的新应用-洞察及研究
- 分布式数据库调优-洞察及研究
- 2025年公共营养师三级考试试卷及答案
- 开工前安全培训教学课件
- 高铁隧道配套施工方案
- 三人合伙工程合同协议书
- 2025曲靖市事业单位定向招聘驻曲部队未就业随军家属(8人)备考练习试题及答案解析
- 包子铺合伙开店协议合同
- 2025广西现代物流集团第三次招聘109人笔试备考题库及答案解析
- 轴承装配工标准化作业考核试卷及答案
- 入住敬老院协议合同模板
- 英语教学发音课件下载
- 2025年特种设备检验人员资格考试(压力管道检验师GDS)历年参考题库含答案详解(5套)
评论
0/150
提交评论