-
Notifications
You must be signed in to change notification settings - Fork 212
Add custom non-default route support #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
What's going on in the commits? |
|
@RahulThennarasu Can you run |
c1b2bc9 to
3d7ddbb
Compare
|
@dcantah I've fixed the formatting issues with |
| public let destination: String | ||
|
|
||
| /// Gateway IP address for this route | ||
| public let gateway: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make these mutable (var) please
| /// The interface MAC address, or nil to auto-configure the address. | ||
| var macAddress: String? { get } | ||
|
|
||
| var routes: [Route] { get } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation like the other fields
| public var macAddress: String? | ||
| public var routes: [Route] { [] } | ||
|
|
||
| public init(address: String, gateway: String?, macAddress: String? = nil) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave the type defined as public var routes: [Route] but just add it to the constructor with a default value of []
| public let address: String | ||
| public let gateway: String? | ||
| public let macAddress: String? | ||
| public var routes: [Route] { [] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| func down(name: String) async throws | ||
| func addressAdd(name: String, address: String) async throws | ||
| func routeAddDefault(name: String, gateway: String) async throws | ||
| func routeAddLink(name: String, address: String, gateway: String, srcAddr: String) async throws |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to add an unsupported entry to the bottom like what is done for `closeProcessStdin1 and the others
3d7ddbb to
7da1cfa
Compare
|
@dcantah I've made the changes, it should be good now. |
Addresses #186
Changes
gatewayfield toIpRouteAddLinkRequestprotorouteAdd()to handle gateway routes via netlinkRoutestruct androutesproperty toInterfaceprotocolinterface.routes