Skip to content

Commit

Permalink
[=] 去除暂时不用的API
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanmei-Liu committed Sep 23, 2024
1 parent 8198f8e commit c89a0de
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 75 deletions.
66 changes: 0 additions & 66 deletions demo/demo_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1570,37 +1570,6 @@ xqc_demo_cli_close_path_timeout(int fd, short what, void *arg)
}


static void
xqc_demo_cli_trigger_path_cid_rotation(int fd, short what, void *arg)
{
xqc_demo_cli_user_conn_t *user_conn = (xqc_demo_cli_user_conn_t *) arg;
uint64_t path_id = 1;
printf("trigger cid rotation on path: path_id %"PRIu64"\n", path_id);
int ret = xqc_conn_trigger_cid_rotation_on_path(user_conn->ctx->engine, &(user_conn->cid), path_id);
if (ret != XQC_OK) {
printf("trigger cid rotation on path: path_id %"PRIu64" failed\n", path_id);
} else {
user_conn->trigger_cid_rotation = XQC_TRUE;
}
}


static void
xqc_demo_cli_trigger_path_cid_retirment(int fd, short what, void *arg)
{
xqc_demo_cli_user_conn_t *user_conn = (xqc_demo_cli_user_conn_t *) arg;
uint64_t path_id = 1;

if (!user_conn->trigger_cid_rotation) {
printf("can't trigger cid retirement on path: path_id %"PRIu64" because the cid rotation failed\n", path_id);
return;
}

printf("trigger cid retirement on path: path_id %"PRIu64"\n", path_id);
xqc_conn_trigger_cid_retirement_on_path(user_conn->ctx->engine, &(user_conn->cid), path_id);
}


static void
xqc_demo_cli_rebind_path0(int fd, short what, void *arg)
{
Expand Down Expand Up @@ -2104,11 +2073,6 @@ xqc_demo_cli_parse_args(int argc, char *argv[], xqc_demo_cli_client_args_t *args
args->quic_cfg.close_path = atoi(optarg);
break;

case 'g':
printf("option force a cid rotation after %s ms\n", optarg);
args->quic_cfg.path_cid_rotation = atoi(optarg);
break;

case 'N':
printf("option no encryption on\n");
args->quic_cfg.no_encryption = 1;
Expand Down Expand Up @@ -2652,14 +2616,6 @@ xqc_demo_cli_init_xquic_connection(xqc_demo_cli_user_conn_t *user_conn,
user_conn->path_status_time = 0;
}

if (conn_settings.enable_multipath
&& conn_settings.multipath_version >= XQC_MULTIPATH_10
&& args->quic_cfg.remove_path_flag == 1)
{
user_conn->remove_path_flag = 1;
user_conn->idle_timeout = args->quic_cfg.idle_timeout;
}

return 0;
}

Expand Down Expand Up @@ -2698,28 +2654,6 @@ xqc_demo_cli_start(xqc_demo_cli_user_conn_t *user_conn, xqc_demo_cli_client_args
event_add(user_conn->ev_close_path, &tv);
}

if (args->quic_cfg.path_cid_rotation) {
user_conn->ev_path_cid_rotation = event_new(user_conn->ctx->eb, -1, 0,
xqc_demo_cli_trigger_path_cid_rotation,
user_conn);
struct timeval tv = {
.tv_sec = args->quic_cfg.path_cid_rotation / 1000,
.tv_usec = (args->quic_cfg.path_cid_rotation % 1000) * 1000,
};
event_add(user_conn->ev_path_cid_rotation, &tv);
}

if (args->quic_cfg.path_cid_retirement) {
user_conn->ev_path_cid_retirement = event_new(user_conn->ctx->eb, -1, 0,
xqc_demo_cli_trigger_path_cid_retirment,
user_conn);
struct timeval tv = {
.tv_sec = args->quic_cfg.path_cid_retirement / 1000,
.tv_usec = (args->quic_cfg.path_cid_retirement % 1000) * 1000,
};
event_add(user_conn->ev_path_cid_retirement, &tv);
}

if (args->net_cfg.rebind_p0) {
user_conn->ev_rebinding_p0 = event_new(user_conn->ctx->eb, -1, 0,
xqc_demo_cli_rebind_path0,
Expand Down
7 changes: 0 additions & 7 deletions include/xquic/xquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2037,13 +2037,6 @@ XQC_EXPORT_PUBLIC_API
xqc_int_t xqc_path_get_local_addr(xqc_connection_t *conn, uint64_t path_id,
struct sockaddr *addr, socklen_t addr_cap, socklen_t *local_addr_len);


XQC_EXPORT_PUBLIC_API
xqc_int_t xqc_conn_trigger_cid_rotation_on_path(xqc_engine_t *engine, const xqc_cid_t *scid, uint64_t path_id);

XQC_EXPORT_PUBLIC_API
xqc_int_t xqc_conn_trigger_cid_retirement_on_path(xqc_engine_t *engine, const xqc_cid_t *scid, uint64_t path_id);

/**
* @brief load balance cid encryption.
* According to Draft : https://datatracker.ietf.org/doc/html/draft-ietf-quic-load-balancers-13#section-4.3.2
Expand Down
2 changes: 0 additions & 2 deletions scripts/xquic.lds
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ XQUIC_VERS_1.0 {
xqc_lb_cid_encryption;
xqc_path_get_peer_addr;
xqc_path_get_local_addr;
xqc_conn_trigger_cid_rotation_on_path;
xqc_conn_trigger_cid_retirement_on_path;
xqc_default_reinj_ctl_cb;
xqc_deadline_reinj_ctl_cb;
xqc_dgram_reinj_ctl_cb;
Expand Down

0 comments on commit c89a0de

Please sign in to comment.