blob: 81debba5d371015511c2b1ae481e89849965a9fe [file] [log] [blame]
syntax="proto3";
option java_package = "org.onosproject.grpc.nb.net.host";
package nb.net.host;
import "net/HostProto.proto";
import "net/HostIdProto.proto";
import "net/ConnectPointProto.proto";
message getHostCountRequest {
}
message getHostCountReply {
int32 host_count = 1;
}
message getHostsRequest {
}
message getHostsReply {
repeated .net.HostProto host = 1;
}
message getHostRequest {
.net.HostIdProto host_id = 1;
}
message getHostReply {
.net.HostProto host = 1;
}
message getHostsByVlanRequest {
string vlan_id = 1;
}
message getHostsByVlanReply {
repeated .net.HostProto host = 1;
}
message getHostsByMacRequest {
string mac = 1;
}
message getHostsByMacReply {
repeated .net.HostProto host = 1;
}
message getHostsByIpRequest {
string ip_address = 1;
}
message getHostsByIpReply {
repeated .net.HostProto host = 1;
}
message getConnectedHostsRequest {
oneof connected_host {
.net.ConnectPointProto connect_point = 1;
string deviceId = 2;
}
}
message getConnectedHostsReply {
repeated .net.HostProto host = 1;
}
message startMonitoringIpRequest {
string ip_address = 1;
}
message startMonitoringIpReply {
}
message stopMonitoringIpRequest {
string ip_address = 1;
}
message stopMonitoringIpReply {
}
message requestMacRequest {
string ip_address = 1;
}
message requestMacReply {
}
// Host Interface exported by the server.
service HostService {
// GRPC Obtains the host count.
rpc getHostCount(getHostCountRequest) returns (getHostCountReply) {}
// GRPC Obtains the hosts.
rpc getHosts(getHostsRequest) returns (getHostsReply) {}
// GRPC Obtains the host at a given HostId.
rpc getHost(getHostRequest) returns (getHostReply) {}
// GRPC Obtains the hosts at a given VlanId.
rpc getHostsByVlan(getHostsByVlanRequest) returns (getHostsByVlanReply) {}
// GRPC Obtains the hosts at a given MacAddress.
rpc getHostsByMac(getHostsByMacRequest) returns (getHostsByMacReply) {}
// GRPC Obtains the hosts at a given IpAddress.
rpc getHostsByIp(getHostsByIpRequest) returns (getHostsByIpReply) {}
// GRPC Obtains the hosts at a given connectPoint or DeviceId.
rpc getConnectedHosts(getConnectedHostsRequest) returns (getConnectedHostsReply) {}
// GRPC Requests the host service to monitor hosts with the given IP address.
rpc startMonitoringIp(startMonitoringIpRequest) returns (startMonitoringIpReply) {}
// GRPC Stops the host service from monitoring an IP address.
rpc stopMonitoringIp(stopMonitoringIpRequest) returns (stopMonitoringIpReply) {}
// GRPC Requests the host service to resolve the MAC address for the given IP address.
rpc requestMac(requestMacRequest) returns (requestMacReply) {}
}