Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create OpenFlow 1.3.1 messages #13

Open
yasuhito opened this issue Jan 24, 2013 · 1 comment
Open

Create OpenFlow 1.3.1 messages #13

yasuhito opened this issue Jan 24, 2013 · 1 comment

Comments

@yasuhito
Copy link
Member

でかいので後で分割しましょう。

  • FlowMod
  • Hello
  • Echo
  • PacketIn/Out
  • MultiPartRequest/Reply
  • etc.
@nickkaranatsios
Copy link
Member

Currently coded messages:

  • Hello
  • EchoRequest
  • FeaturesRequest
  • GetConfigRequest
  • SetConfig

Messages are also reside in a separate directory (messages) and for each message we have a Ruby class that defines the object and a corresponding c file with a pack method that creates the buffer object representation ready for transmission. A typical message class looks like the following:

require "trema/message-accessor"


module Trema
  module Messages
    class EchoRequest < MessageAccessor
      unsigned_int32 :transaction_id
      array :user_data
    end
  end
end

Again the MessageAccessor class name TBD.
Takamiya-san I am thinking of using the current controller helper methods like send_flow_mod_xxx but in addition create a corresponding Message object (FlowMod{Add,Modify,Delete} not only for processing and validating its options but also for storing the object for later reference if needed. Any thoughts on this subject. This would help me design the flow_mod message. Need also to check how set_match_from_packet would work. Hopefully I can have the learning-switch.rb going by the end of this week that's my target anyway.
Also which form of class decleration you prefer the multi-line one or the shorter version. For example:

module Trema
  module ActionList
    class CopyTtlOut < ActionAccessor
    end
  end
end

OR

class Trema::ActionList::CopyTtlOut < Trema::ActionAccessor
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants