Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
pktpls committed Jan 19, 2024
1 parent 21b6279 commit e96a1b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 48 deletions.
48 changes: 0 additions & 48 deletions packages/ucode-mod-l2tp/l2tp.c
Original file line number Diff line number Diff line change
@@ -1,48 +0,0 @@

static const uc_l2tp_nested_spec_t l2tp_tunnel_create_msg = {
.headsize = 0,
.nattrs = 5,
.attrs = {
{ L2TP_ATTR_PROTO_VERSION, "proto_version", DT_, 0, NULL },
{ L2TP_ATTR_CONN_ID, "conn_id", DT_, 0, NULL },
{ L2TP_ATTR_PEER_CONN_ID, "peer_conn_id", DT_, 0, NULL },
{ L2TP_ATTR_ENCAP_TYPE, "encap_type", DT_, 0, NULL },
{ L2TP_ATTR_FD, "fd", DT_, 0, NULL },
}
};

static const uc_l2tp_nested_spec_t l2tp_tunnel_delete_msg = {
.headsize = 0,
.nattrs = 2,
.attrs = {
{ L2TP_ATTR_CONN_ID, "conn_id", DT_, 0, NULL },
{ L2TP_ATTR_SESSION_ID, "session_id", DT_, 0, NULL },
}
};
static const uc_l2tp_nested_spec_t l2tp_session_create_msg = {
.headsize = 0,
.nattrs = 5,
.attrs = {
{ L2TP_ATTR_CONN_ID, "conn_id", DT_, 0, NULL },
{ L2TP_ATTR_SESSION_ID, "session_id", DT_, 0, NULL },
{ L2TP_ATTR_PEER_SESSION_ID, "peer_session_id", DT_, 0, NULL },
{ L2TP_ATTR_PW_TYPE, "pw_type", DT_, 0, NULL },
{ L2TP_ATTR_IFNAME, "ifname", DT_, 0, NULL },
}
};
static const uc_l2tp_nested_spec_t l2tp_session_delete_msg = {
.headsize = 0,
.nattrs = 1,
.attrs = {
{ L2TP_ATTR_CONN_ID, "conn_id", DT_, 0, NULL },
}
};
static const uc_l2tp_nested_spec_t l2tp_session_set_mtu_msg = {
.headsize = 0,
.nattrs = 3,
.attrs = {
{ L2TP_ATTR_CONN_ID, "conn_id", DT_, 0, NULL },
{ L2TP_ATTR_SESSION_ID, "session_id", DT_, 0, NULL },
{ L2TP_ATTR_MTU, "mtu", DT_, 0, NULL },
}
};
8 changes: 8 additions & 0 deletions packages/ucode-mod-l2tp/notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

# ucode-mod-l2tp

## testing

ip netns add server
ip netns add uplink
ip netns add client

...

## tunneldigger

context_process()
Expand Down
1 change: 1 addition & 0 deletions packages/ucode-mod-wireguard/src/wireguard.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ typedef struct {

// static unsigned int uc_wg_default_port = 51820;

// TODO credits and license, i think this is from wg-tools
static inline bool
uc_wg_parse_endpoint(uc_wg_addr_t *endpoint, const char *value)
{
Expand Down

0 comments on commit e96a1b1

Please sign in to comment.