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 
34 #ifndef NET_CORD_EP_H
35 #define NET_CORD_EP_H
36 
37 #include "net/sock/udp.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
46 enum {
47  CORD_EP_OK = 0,
49  CORD_EP_ERR = -2,
50  CORD_EP_NORD = -3,
52 };
53 
66 int cord_ep_discover_regif(const sock_udp_ep_t *remote,
67  char *regif, size_t maxlen);
68 
89 int cord_ep_register(const sock_udp_ep_t *remote, const char *regif);
90 
98 int cord_ep_update(void);
99 
107 int cord_ep_remove(void);
108 
112 void cord_ep_dump_status(void);
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif /* NET_CORD_EP_H */
119 
udp.h
UDP sock definitions.
cord_ep_dump_status
void cord_ep_dump_status(void)
Dump the current RD connection status to STDIO (for debugging)
CORD_EP_TIMEOUT
@ CORD_EP_TIMEOUT
no response from the network
Definition: ep.h:48
cord_ep_discover_regif
int cord_ep_discover_regif(const sock_udp_ep_t *remote, char *regif, size_t maxlen)
Discover the registration interface resource of a RD.
_sock_tl_ep
Common IP-based transport layer end point.
Definition: sock.h:213
CORD_EP_ERR
@ CORD_EP_ERR
internal error or invalid reply
Definition: ep.h:49
cord_ep_remove
int cord_ep_remove(void)
Unregister from a given RD server.
cord_ep_update
int cord_ep_update(void)
Update our current entry at the RD.
cord_ep_register
int cord_ep_register(const sock_udp_ep_t *remote, const char *regif)
Initiate the node registration by sending an empty push.
CORD_EP_OK
@ CORD_EP_OK
everything went as expected
Definition: ep.h:47
CORD_EP_NORD
@ CORD_EP_NORD
not connected to an RD
Definition: ep.h:50
CORD_EP_OVERFLOW
@ CORD_EP_OVERFLOW
internal buffers can not handle input
Definition: ep.h:51