2008-08-08 22:22:13 -05:00
|
|
|
// stream.proto
|
|
|
|
|
|
|
|
// FIXME: Re-evaluate Tag Values
|
|
|
|
|
|
|
|
package OstProto;
|
|
|
|
|
2008-09-28 13:01:52 -05:00
|
|
|
message StreamId {
|
|
|
|
required uint32 id = 1;
|
|
|
|
}
|
2008-08-08 22:22:13 -05:00
|
|
|
|
|
|
|
message StreamCore {
|
|
|
|
enum FrameLengthMode {
|
|
|
|
e_fl_fixed = 0;
|
|
|
|
e_fl_inc = 1;
|
|
|
|
e_fl_dec = 2;
|
|
|
|
e_fl_random = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Basics
|
|
|
|
optional string name = 1;
|
|
|
|
optional bool is_enabled = 2;
|
|
|
|
optional uint32 ordinal = 3;
|
|
|
|
|
|
|
|
// Frame Length (includes CRC)
|
2008-08-30 03:49:08 -05:00
|
|
|
optional FrameLengthMode len_mode = 14 [default = e_fl_fixed];
|
|
|
|
optional uint32 frame_len = 15 [default = 64];
|
2008-10-05 12:07:33 -05:00
|
|
|
optional uint32 frame_len_min = 16 [default = 64];
|
|
|
|
optional uint32 frame_len_max = 17 [default = 1518];
|
2008-08-08 22:22:13 -05:00
|
|
|
|
|
|
|
// Currently Selected Protocols
|
2009-08-02 09:52:34 -05:00
|
|
|
//repeated uint32 frame_proto = 20;
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
2008-09-28 13:01:52 -05:00
|
|
|
message StreamControl {
|
|
|
|
enum SendUnit {
|
|
|
|
e_su_packets = 0;
|
|
|
|
e_su_bursts = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum SendMode {
|
|
|
|
e_sm_fixed = 0;
|
|
|
|
e_sm_continuous = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum NextWhat {
|
|
|
|
e_nw_stop = 0;
|
|
|
|
e_nw_goto_next = 1;
|
|
|
|
e_nw_goto_id = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
optional SendUnit unit = 1 [default = e_su_packets];
|
|
|
|
optional SendMode mode = 2 [default = e_sm_fixed];
|
|
|
|
optional uint32 num_packets = 3 [default = 1];
|
|
|
|
optional uint32 num_bursts = 4 [default = 1];
|
|
|
|
optional uint32 packets_per_burst = 5 [default = 10];
|
|
|
|
optional NextWhat next = 6 [default = e_nw_goto_next];
|
2009-02-22 01:53:14 -06:00
|
|
|
optional uint32 packets_per_sec = 7 [default = 1];
|
|
|
|
optional uint32 bursts_per_sec = 8 [default = 1];
|
2008-09-28 13:01:52 -05:00
|
|
|
|
|
|
|
// TODO: Gaps?
|
|
|
|
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
2009-08-02 09:52:34 -05:00
|
|
|
message ProtocolId {
|
|
|
|
required uint32 id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Protocol {
|
|
|
|
|
|
|
|
required ProtocolId protocol_id = 1;
|
|
|
|
|
|
|
|
extensions 51 to 100; // Reserved for Ostinato Use
|
|
|
|
extensions 101 to 200; // Available for use by protocols
|
|
|
|
|
|
|
|
enum k {
|
|
|
|
kMacFieldNumber = 51;
|
|
|
|
kPayloadFieldNumber = 52;
|
|
|
|
|
|
|
|
kEth2FieldNumber = 121;
|
|
|
|
kDot3FieldNumber = 122;
|
|
|
|
kLlcFieldNumber = 123;
|
|
|
|
kSnapFieldNumber = 124;
|
|
|
|
|
|
|
|
kVlanFieldNumber = 126;
|
|
|
|
|
|
|
|
kIp4FieldNumber = 130;
|
|
|
|
kArpFieldNumber = 131;
|
|
|
|
|
|
|
|
kTcpFieldNumber = 140;
|
|
|
|
kUdpFieldNumber = 141;
|
|
|
|
kIcmpFieldNumber = 142;
|
|
|
|
kIgmpFieldNumber = 143;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-08-08 22:22:13 -05:00
|
|
|
message Stream {
|
|
|
|
|
2008-08-23 23:39:08 -05:00
|
|
|
required StreamId stream_id = 1;
|
2008-08-08 22:22:13 -05:00
|
|
|
optional StreamCore core = 2;
|
2008-09-28 13:01:52 -05:00
|
|
|
optional StreamControl control = 3;
|
2008-08-08 22:22:13 -05:00
|
|
|
|
2009-08-02 09:52:34 -05:00
|
|
|
repeated Protocol protocol = 4;
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message Void {
|
|
|
|
// nothing!
|
|
|
|
}
|
|
|
|
|
|
|
|
message Ack {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2008-08-23 23:39:08 -05:00
|
|
|
message PortId {
|
|
|
|
required uint32 id = 1;
|
|
|
|
}
|
|
|
|
|
2008-08-08 22:22:13 -05:00
|
|
|
message PortIdList {
|
2008-08-23 23:39:08 -05:00
|
|
|
repeated PortId port_id = 1;
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message StreamIdList {
|
2008-08-23 23:39:08 -05:00
|
|
|
required PortId port_id = 1;
|
|
|
|
repeated StreamId stream_id = 2;
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
2008-08-23 23:39:08 -05:00
|
|
|
message Port {
|
|
|
|
required PortId port_id = 1;
|
2008-08-08 22:22:13 -05:00
|
|
|
optional string name = 2;
|
|
|
|
optional string description = 3;
|
|
|
|
optional bool is_enabled = 4;
|
|
|
|
optional bool is_oper_up = 5;
|
|
|
|
optional bool is_exclusive_control = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PortConfigList {
|
2008-08-23 23:39:08 -05:00
|
|
|
repeated Port port = 1;
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message StreamConfigList {
|
2008-08-23 23:39:08 -05:00
|
|
|
required PortId port_id = 1;
|
|
|
|
repeated Stream stream = 2;
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message CaptureBuffer {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
message CaptureBufferList {
|
|
|
|
repeated CaptureBuffer list = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PortStats {
|
2008-09-14 07:03:53 -05:00
|
|
|
required PortId port_id = 1;
|
|
|
|
|
|
|
|
optional uint64 rx_pkts = 11;
|
|
|
|
optional uint64 rx_bytes = 12;
|
2008-09-28 13:01:52 -05:00
|
|
|
optional uint64 rx_pkts_nic = 13;
|
|
|
|
optional uint64 rx_bytes_nic = 14;
|
|
|
|
optional uint64 rx_pps = 15;
|
|
|
|
optional uint64 rx_bps = 16;
|
2008-09-14 07:03:53 -05:00
|
|
|
|
|
|
|
optional uint64 tx_pkts = 21;
|
|
|
|
optional uint64 tx_bytes = 22;
|
2008-09-28 13:01:52 -05:00
|
|
|
optional uint64 tx_pkts_nic = 23;
|
|
|
|
optional uint64 tx_bytes_nic = 24;
|
|
|
|
optional uint64 tx_pps = 25;
|
|
|
|
optional uint64 tx_bps = 26;
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message PortStatsList {
|
2008-09-14 07:03:53 -05:00
|
|
|
repeated PortStats port_stats = 1;
|
2008-08-08 22:22:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
service OstService {
|
|
|
|
rpc getPortIdList(Void) returns (PortIdList);
|
|
|
|
rpc getPortConfig(PortIdList) returns (PortConfigList);
|
|
|
|
|
2008-08-23 23:39:08 -05:00
|
|
|
rpc getStreamIdList(PortId) returns (StreamIdList);
|
2008-08-08 22:22:13 -05:00
|
|
|
rpc getStreamConfig(StreamIdList) returns (StreamConfigList);
|
|
|
|
rpc addStream(StreamIdList) returns (Ack);
|
|
|
|
rpc deleteStream(StreamIdList) returns (Ack);
|
|
|
|
rpc modifyStream(StreamConfigList) returns (Ack);
|
|
|
|
|
|
|
|
rpc startTx(PortIdList) returns (Ack);
|
|
|
|
rpc stopTx(PortIdList) returns (Ack);
|
|
|
|
|
|
|
|
rpc startCapture(PortIdList) returns (Ack);
|
|
|
|
rpc stopCapture(PortIdList) returns (Ack);
|
|
|
|
rpc getCaptureBuffer(PortIdList) returns (CaptureBufferList);
|
|
|
|
|
|
|
|
rpc getStats(PortIdList) returns (PortStatsList);
|
|
|
|
rpc clearStats(PortIdList) returns (Ack);
|
|
|
|
}
|
|
|
|
|