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 
void cord_ep_dump_status(void)
Dump the current RD connection status to STDIO (for debugging)
everything went as expected
Definition: ep.h:47
not connected to an RD
Definition: ep.h:50
UDP sock definitions.
internal error or invalid reply
Definition: ep.h:49
int cord_ep_discover_regif(const sock_udp_ep_t *remote, char *regif, size_t maxlen)
Discover the registration interface resource of a RD.
Common IP-based transport layer end point.
Definition: sock.h:213
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_remove(void)
Unregister from a given RD server.
internal buffers can not handle input
Definition: ep.h:51
no response from the network
Definition: ep.h:48
int cord_ep_update(void)
Update our current entry at the RD.