Skip to content

Commit

Permalink
proto: Add GetNetworkInfo rpc call
Browse files Browse the repository at this point in the history
- updated CHANGELOG.md
- updated README.md
  • Loading branch information
Kamil Triščík authored and kamil-triscik committed May 9, 2024
1 parent f4ed18e commit 8d6033d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Changelog

### Added
* Introduced new field `last_share_time` in the `braiins.bos.v1.PoolStats` that provides info about last share time.
* Introduced new field `token` in the `braiins.bos.v1.LoginResponse` that provides info created authentication token that was till now available only in response header.
* Introduced new field `last_share_time` in the `braiins.bos.v1.PoolStats` that provides info about last share time,
* Introduced new field `token` in the `braiins.bos.v1.LoginResponse` that provides info created authentication token that was till now available only in response header,
* Introduced new field `timeout_s` in the `braiins.bos.v1.LoginResponse` that provides info about authentication token expiration time,
* Introduced new method `GetNetworkInfo` in the `braiins.bos.v1.NetworkService` to get current network configuration for the default network interface.

## [1.0.0] - 2024-03-26
The first stable release of the Public API incorporates minor enhancements.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ Contains miner related messages and **MinerService** with various methods to rea
#### 9. proto/bos/v1/network.proto
Contains network related messages and **NetworkService** with various methods to read and modify network settings:
* **GetNetworkConfiguration** - method to read network configuration,
* **SetNetworkConfiguration** - method to modify network configuration.
* **SetNetworkConfiguration** - method to modify network configuration,
* **GetNetworkInfo** - method to get current network configuration for the default network interface.

#### 10. proto/bos/v1/performance.proto
Contains tuner related messages and **PerformanceService** with various methods to read or modify tuner:
Expand Down
35 changes: 35 additions & 0 deletions proto/bos/v1/network.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,44 @@ message Static {
repeated string dns_servers = 4;
}

message GetNetworkInfoRequest {}

// Response message for GetCurrentNetworkConfiguration
// Represents the current network configuration for the default network interface.
// Only IPv4 is supported.
message GetNetworkInfoResponse {
// Name of the network interface
string name = 1;
// MAC address of the network interface
optional string mac_address = 2;
// Miner hostname
optional string hostname = 3;
// Network protocol
optional NetworkProtocol protocol = 4;
// List of configured DNS servers
repeated string dns_servers = 5;
// List of assigned IP addresses
repeated IpNetwork networks = 6;
// Default gateway/route for the interface
optional string default_gateway = 7;
}

enum NetworkProtocol {
NETWORK_PROTOCOL_UNSPECIFIED = 0;
NETWORK_PROTOCOL_DHCP = 1;
NETWORK_PROTOCOL_STATIC = 2;
}

message IpNetwork {
string address = 1;
string netmask = 2;
}

service NetworkService {
// Method to get network configuration
rpc GetNetworkConfiguration(GetNetworkConfigurationRequest) returns (GetNetworkConfigurationResponse);
// Method to set network configuration. You can specify protocol or hostname, or both.
rpc SetNetworkConfiguration(SetNetworkConfigurationRequest) returns (SetNetworkConfigurationResponse);
// Method to get current network configuration for the default network interface
rpc GetNetworkInfo(GetNetworkInfoRequest) returns (GetNetworkInfoResponse);
}

0 comments on commit 8d6033d

Please sign in to comment.