Commit f719a486 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

remove unused

parent bee7b121
......@@ -7,23 +7,6 @@ use super::flow_mod::{
match_fields::{OxmHeader, OxmMatchFields},
};
struct ActionHeader {
typ: ActionType,
// len: u16,
// pad: [u8; 4],
}
impl ActionHeader {
pub fn new(typ: ActionType) -> Self {
Self { typ }
}
pub fn marshal(&self, bytes: &mut Vec<u8>) {
bytes.write_u16::<BigEndian>(self.typ.clone().into());
bytes.write_u16::<BigEndian>(8);
bytes.write_u32::<BigEndian>(0);
}
}
#[derive(Clone)]
#[repr(u16)]
enum ActionType {
......@@ -102,94 +85,6 @@ impl ActionOutput {
}
}
struct ActionGroup {
typ: ActionType,
len: u16,
group_id: u32,
}
impl ActionGroup {
pub const LEN: usize = 8;
pub fn marshal(&self, bytes: &mut Vec<u8>) {
self.typ.marshal(bytes);
bytes.write_u16::<BigEndian>(self.len);
bytes.write_u32::<BigEndian>(self.group_id);
}
pub fn new(group_id: u32) -> Self {
Self {
typ: ActionType::Group,
len: Self::LEN as u16,
group_id,
}
}
}
struct ActionSetQueue {
typ: ActionType,
len: u16,
queue_id: u32,
}
impl ActionSetQueue {
pub const LEN: usize = 8;
pub fn marshal(&self, bytes: &mut Vec<u8>) {
self.typ.marshal(bytes);
bytes.write_u16::<BigEndian>(self.len);
bytes.write_u32::<BigEndian>(self.queue_id);
}
pub fn new(queue_id: u32) -> Self {
Self {
typ: ActionType::SetQueue,
len: Self::LEN as u16,
queue_id,
}
}
}
struct ActionMplsTtl {
typ: ActionType,
len: u16,
mpls_ttl: u8,
pad: [u8; 3],
}
impl ActionMplsTtl {
pub const LEN: usize = 8;
}
struct ActionNwTtl {
typ: ActionType, // OFPAT_SET_NW_TTL
len: u16, // Length is 8.
nw_ttl: u8, // IP TTL
pad: [u8; 3],
}
impl ActionNwTtl {
pub const LEN: usize = 8;
}
struct ActionPush {
typ: ActionType,
len: u16,
ethertype: u16,
pad: [u8; 2],
}
impl ActionPush {
pub const LEN: usize = 8;
}
struct ActionPopMpls {
typ: ActionType,
len: u16,
ethertype: u16,
pad: [u8; 2],
}
impl ActionPopMpls {
pub const LEN: usize = 8;
}
#[derive(Clone)]
pub enum SetField {
InPort(PseudoPort), // Ingress port. This may be a physical or switch-defined logical port.
......@@ -266,11 +161,6 @@ impl SetField {
}
}
struct ActionExperimenterHeader {
typ: ActionType,
len: u16,
experimenter: u32,
}
pub type Buffer = u16;
#[derive(Clone)]
......
......@@ -5,9 +5,9 @@ pub mod command;
pub use command::FlowModCommand;
pub mod match_fields;
pub use match_fields::{Mask, MatchFields};
pub use match_fields::{MatchFields, MatchType, OfpMatch};
pub mod flow_mod_flags;
pub use flow_mod_flags::FlowModFlags;
pub mod instructions;
\ No newline at end of file
pub mod instructions;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment