summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-13 13:48:17 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-13 13:48:17 +0200
commit7834e92b218da69cd934679dec9c2d714d89d15e (patch)
treee2174dd2810a20e90050481e2fd54ce61e414baf /src/ipcpd/shim-udp
parentddfc7091d2698d36c1cfec49eaaad96b278bb37b (diff)
downloadouroboros-7834e92b218da69cd934679dec9c2d714d89d15e.tar.gz
ouroboros-7834e92b218da69cd934679dec9c2d714d89d15e.zip
lib, irmd, tools, ipcpd: updates to dev API.
The registration function has been moved to the irm tool, applications now need to be registered by an administrator. Currently only supports one instance per registered name, and an AP can be registered under only one name. The irmd can now start a registered server application on demand. For the full functionality of the tool, execute "irm register". AP name removed from flow allocation. Flow allocation does not send the source ap name as it is quite useless. The accept() call now only returns the AE name.
Diffstat (limited to 'src/ipcpd/shim-udp')
-rw-r--r--src/ipcpd/shim-udp/main.c12
-rw-r--r--src/ipcpd/shim-udp/shim_udp_messages.proto1
2 files changed, 2 insertions, 11 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c
index 48fa141e..99fb134d 100644
--- a/src/ipcpd/shim-udp/main.c
+++ b/src/ipcpd/shim-udp/main.c
@@ -384,7 +384,6 @@ static int send_shim_udp_msg(shim_udp_msg_t * msg,
static int ipcp_udp_port_alloc(uint32_t dst_ip_addr,
uint32_t src_udp_port,
char * dst_name,
- char * src_ap_name,
char * src_ae_name)
{
shim_udp_msg_t msg = SHIM_UDP_MSG__INIT;
@@ -392,7 +391,6 @@ static int ipcp_udp_port_alloc(uint32_t dst_ip_addr,
msg.code = SHIM_UDP_MSG_CODE__FLOW_REQ;
msg.src_udp_port = src_udp_port;
msg.dst_name = dst_name;
- msg.src_ap_name = src_ap_name;
msg.src_ae_name = src_ae_name;
return send_shim_udp_msg(&msg, dst_ip_addr);
@@ -428,7 +426,6 @@ static int ipcp_udp_port_dealloc(uint32_t dst_ip_addr,
static int ipcp_udp_port_req(struct sockaddr_in * c_saddr,
char * dst_name,
- char * src_ap_name,
char * src_ae_name)
{
int fd;
@@ -486,7 +483,6 @@ static int ipcp_udp_port_req(struct sockaddr_in * c_saddr,
/* reply to IRM */
port_id = ipcp_flow_req_arr(getpid(),
dst_name,
- src_ap_name,
src_ae_name);
if (port_id < 0) {
@@ -682,7 +678,6 @@ static void * ipcp_udp_listener()
c_saddr.sin_port = msg->src_udp_port;
ipcp_udp_port_req(&c_saddr,
msg->dst_name,
- msg->src_ap_name,
msg->src_ae_name);
break;
case SHIM_UDP_MSG_CODE__FLOW_REPLY:
@@ -1214,7 +1209,6 @@ static int ipcp_udp_name_unreg(char * name)
static int ipcp_udp_flow_alloc(pid_t n_pid,
int port_id,
char * dst_name,
- char * src_ap_name,
char * src_ae_name,
enum qos_cube qos)
{
@@ -1229,12 +1223,11 @@ static int ipcp_udp_flow_alloc(pid_t n_pid,
#endif
struct shm_ap_rbuff * rb;
- LOG_INFO("Allocating flow from %s to %s.", src_ap_name, dst_name);
+ LOG_INFO("Allocating flow to %s.", dst_name);
- if (dst_name == NULL || src_ap_name == NULL || src_ae_name == NULL)
+ if (dst_name == NULL || src_ae_name == NULL)
return -1;
if (strlen(dst_name) > 255
- || strlen(src_ap_name) > 255
|| strlen(src_ae_name) > 255) {
LOG_ERR("Name too long for this shim.");
return -1;
@@ -1332,7 +1325,6 @@ static int ipcp_udp_flow_alloc(pid_t n_pid,
if (ipcp_udp_port_alloc(ip_addr,
f_saddr.sin_port,
dst_name,
- src_ap_name,
src_ae_name) < 0) {
LOG_DBGF("Port alloc returned -1.");
rw_lock_rdlock(&_ipcp->state_lock);
diff --git a/src/ipcpd/shim-udp/shim_udp_messages.proto b/src/ipcpd/shim-udp/shim_udp_messages.proto
index a15fc18c..e6bac908 100644
--- a/src/ipcpd/shim-udp/shim_udp_messages.proto
+++ b/src/ipcpd/shim-udp/shim_udp_messages.proto
@@ -7,7 +7,6 @@ enum shim_udp_msg_code {
message shim_udp_msg {
required shim_udp_msg_code code = 1;
optional string dst_name = 2;
- optional string src_ap_name = 3;
optional string src_ae_name = 4;
required sint32 src_udp_port = 5;
optional sint32 dst_udp_port = 6;