Jonathan Hart | 097c8f5 | 2016-06-09 18:08:11 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | option java_package = "org.onosproject.grpc.net.mcast"; |
| 3 | |
| 4 | package Multicast; |
| 5 | |
| 6 | // TODO move model objects to common protobuf package |
| 7 | |
| 8 | message ConnectPoint { |
| 9 | string deviceId = 1; |
| 10 | uint64 portNumber = 2; |
| 11 | } |
| 12 | |
| 13 | enum MulticastRouteType { |
| 14 | PIM = 0; |
| 15 | IGMP = 1; |
| 16 | STATIC = 2; |
| 17 | } |
| 18 | |
| 19 | enum MulticastOperationResult { |
| 20 | SUCCESS = 0; |
| 21 | FAIL = 1; |
| 22 | } |
| 23 | |
| 24 | enum MulticastOperation { |
| 25 | ADD_ROUTE = 0; |
| 26 | ADD_SOURCE = 1; |
| 27 | ADD_SINK = 2; |
| 28 | REMOVE_ROUTE = 3; |
| 29 | REMOVE_SOURCE = 4; |
| 30 | REMOVE_SINK = 5; |
| 31 | } |
| 32 | |
| 33 | message MulticastRoute { |
| 34 | fixed32 source = 1; // TODO assumes ipv4 |
| 35 | fixed32 group = 2; |
| 36 | MulticastRouteType type = 3; |
| 37 | } |
| 38 | |
| 39 | message MulticastReply { |
| 40 | MulticastOperationResult result = 1; |
| 41 | } |
| 42 | |
| 43 | message MulticastRequest { |
| 44 | MulticastOperation operation = 1; |
| 45 | MulticastRoute route = 2; |
| 46 | ConnectPoint connectPoint = 3; |
| 47 | } |
| 48 | |
| 49 | service MulticastRouteService { |
| 50 | rpc operation(stream MulticastRequest) returns (stream MulticastReply) {} |
| 51 | } |