ep.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017-2018 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
36 #include "net/sock/udp.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
45 enum {
46  CORD_EP_OK = 0,
48  CORD_EP_ERR = -2,
49  CORD_EP_NORD = -3,
51 };
52 
66  char *regif, size_t maxlen);
67 
88 int cord_ep_register(const sock_udp_ep_t *remote, const char *regif);
89 
97 int cord_ep_update(void);
98 
106 int cord_ep_remove(void);
107 
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
void cord_ep_dump_status(void)
Dump the current RD connection status to STDIO (for debugging)
int cord_ep_register(const sock_udp_ep_t *remote, const char *regif)
Initiate the node registration by sending an empty push.
int cord_ep_update(void)
Update our current entry at the RD.
int cord_ep_remove(void)
Unregister from a given RD server.
int cord_ep_discover_regif(const sock_udp_ep_t *remote, char *regif, size_t maxlen)
Discover the registration interface resource of a RD.
@ CORD_EP_ERR
internal error or invalid reply
Definition: ep.h:48
@ CORD_EP_NORD
not connected to an RD
Definition: ep.h:49
@ CORD_EP_OVERFLOW
internal buffers can not handle input
Definition: ep.h:50
@ CORD_EP_TIMEOUT
no response from the network
Definition: ep.h:47
@ CORD_EP_OK
everything went as expected
Definition: ep.h:46
UDP sock definitions.
Common IP-based transport layer end point.
Definition: sock.h:214