summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dev.c15
-rw-r--r--src/lib/ipcp_config.proto13
-rw-r--r--src/lib/irm.c2
3 files changed, 24 insertions, 6 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 4b78c1db..a6be762b 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -1768,6 +1768,21 @@ int ipcp_flow_get_qoscube(int fd,
return 0;
}
+size_t ipcp_flow_queued(int fd)
+{
+ size_t q;
+
+ pthread_rwlock_rdlock(&ai.lock);
+
+ assert(ai.flows[fd].flow_id >= 0);
+
+ q = shm_rbuff_queued(ai.flows[fd].tx_rb);
+
+ pthread_rwlock_unlock(&ai.lock);
+
+ return q;
+}
+
ssize_t local_flow_read(int fd)
{
ssize_t ret;
diff --git a/src/lib/ipcp_config.proto b/src/lib/ipcp_config.proto
index 23c65e94..7bf5329e 100644
--- a/src/lib/ipcp_config.proto
+++ b/src/lib/ipcp_config.proto
@@ -36,15 +36,16 @@ message ipcp_config_msg {
optional uint32 max_ttl = 5;
optional uint32 addr_auth_type = 6;
optional uint32 routing_type = 7;
+ optional uint32 cong_avoid = 8;
// Config for UDP
- optional uint32 ip_addr = 8;
- optional uint32 dns_addr = 9;
- optional uint32 clt_port = 10;
- optional uint32 srv_port = 11;
+ optional uint32 ip_addr = 9;
+ optional uint32 dns_addr = 10;
+ optional uint32 clt_port = 11;
+ optional uint32 srv_port = 12;
// Config for the Ethernet
- optional string dev = 12;
+ optional string dev = 13;
// Config for DIX Ethernet
- optional uint32 ethertype = 13;
+ optional uint32 ethertype = 14;
}
enum enroll_code {
diff --git a/src/lib/irm.c b/src/lib/irm.c
index 08dffb6c..42ad74fa 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -132,6 +132,8 @@ int irm_bootstrap_ipcp(pid_t pid,
config.addr_auth_type = conf->addr_auth_type;
config.has_routing_type = true;
config.routing_type = conf->routing_type;
+ config.has_cong_avoid = true;
+ config.cong_avoid = conf->cong_avoid;
break;
case IPCP_UDP:
config.has_ip_addr = true;