Skip to content
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

Add netlink implementation #2009

Merged
merged 8 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"jetmartin.bats",
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"eamodio.gitlens"
"eamodio.gitlens",
"github.copilot",
"ms-python.python"
]
}
},
Expand Down
2 changes: 2 additions & 0 deletions .github/.codespellignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ punycode
bitap
mmapped
dnsmasq
iif
prefered
1 change: 1 addition & 0 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ static struct {
{ "/api/config", "/{element}", api_config, { API_PARSE_JSON, 0 }, true, HTTP_GET },
{ "/api/config", "/{element}/{value}", api_config, { API_PARSE_JSON, 0 }, true, HTTP_DELETE | HTTP_PUT },
{ "/api/network/gateway", "", api_network_gateway, { API_PARSE_JSON, 0 }, true, HTTP_GET },
{ "/api/network/routes", "", api_network_routes, { API_PARSE_JSON, 0 }, true, HTTP_GET },
{ "/api/network/interfaces", "", api_network_interfaces, { API_PARSE_JSON, 0 }, true, HTTP_GET },
{ "/api/network/devices", "", api_network_devices, { API_PARSE_JSON, 0 }, true, HTTP_GET },
{ "/api/network/devices", "/{device_id}", api_network_devices, { API_PARSE_JSON, 0 }, true, HTTP_DELETE },
Expand Down
1 change: 1 addition & 0 deletions src/api/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ int api_logs(struct ftl_conn *api);

// Network methods
int api_network_gateway(struct ftl_conn *api);
int api_network_routes(struct ftl_conn *api);
int api_network_interfaces(struct ftl_conn *api);
int api_network_devices(struct ftl_conn *api);
int api_client_suggestions(struct ftl_conn *api);
Expand Down
3 changes: 3 additions & 0 deletions src/api/docs/content/specs/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ paths:
/network/gateway:
$ref: 'network.yaml#/components/paths/gateway'

/network/routes:
$ref: 'network.yaml#/components/paths/routes'

/network/interfaces:
$ref: 'network.yaml#/components/paths/interfaces'

Expand Down
Loading
Loading