contiv / libOpenflow

Apache License 2.0
21 stars 45 forks source link

Add support for Nicira OpenFlow extension #6

Closed wenyingd closed 5 years ago

wenyingd commented 5 years ago
  1. Add support to match standard OF field: arp_sha, arp_tha, arp_spa, arp_tpa
  2. Add support to match standard OF field: stcp_src/stcp_dst
  3. Add support to match Nicira OF extension field: regN, ct_state, ct_mark, ct_zone, conj_id
  4. Add support for standard OF action: dec_ttl
  5. Add support for Nicira OF extension actions: conjunction, ct, load, move, resubmit, nat, output_reg, dec_ttl
  6. Add public function to find MatchField by filed name. It is used to set extended actions: load, move, output_reg
wenyingd commented 5 years ago

Hi @jojimt, I have updated code to avoid magic number and add length check before unmarshal byte slice, could you help review again?

Besides, I found existent code use underscore in consts to define OF messages actions and messages, so I follow these style to define Nicira extension action types. But it might not be a recommended name format in golang, could you help give some suggestions on keeping existent name style or change to camel caps style?

wenyingd commented 5 years ago

Hi @jojimt , thanks so much for helping merge this PR. I found there are some spelling issues and a minor bug in decode Action header, so I create another PR, could you help review it?