Add custom non-default route support#376
Open
RahulThennarasu wants to merge 1 commit intoapple:mainfrom
Open
Conversation
Member
|
What's going on in the commits? |
dcantah
reviewed
Oct 30, 2025
Member
|
@RahulThennarasu Can you run |
c1b2bc9 to
3d7ddbb
Compare
Contributor
Author
|
@dcantah I've fixed the formatting issues with |
dcantah
reviewed
Nov 4, 2025
Comment on lines
20
to
23
| public let destination: String | ||
|
|
||
| /// Gateway IP address for this route | ||
| public let gateway: String |
dcantah
reviewed
Nov 4, 2025
| /// The interface MAC address, or nil to auto-configure the address. | ||
| var macAddress: String? { get } | ||
|
|
||
| var routes: [Route] { get } |
Member
There was a problem hiding this comment.
Documentation like the other fields
dcantah
reviewed
Nov 4, 2025
| public var macAddress: String? | ||
| public var routes: [Route] { [] } | ||
|
|
||
| public init(address: String, gateway: String?, macAddress: String? = nil) { |
Member
There was a problem hiding this comment.
Leave the type defined as public var routes: [Route] but just add it to the constructor with a default value of []
dcantah
reviewed
Nov 4, 2025
| public let address: String | ||
| public let gateway: String? | ||
| public let macAddress: String? | ||
| public var routes: [Route] { [] } |
Member
There was a problem hiding this comment.
dcantah
reviewed
Nov 4, 2025
| 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 |
Member
There was a problem hiding this comment.
You'll need to add an unsupported entry to the bottom like what is done for `closeProcessStdin1 and the others
3d7ddbb to
7da1cfa
Compare
Contributor
Author
|
@dcantah I've made the changes, it should be good now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #186
Changes
gatewayfield toIpRouteAddLinkRequestprotorouteAdd()to handle gateway routes via netlinkRoutestruct androutesproperty toInterfaceprotocolinterface.routes