ep.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2017-2018 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
33 #include "net/sock/udp.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
42 enum {
43  CORD_EP_OK = 0,
45  CORD_EP_ERR = -2,
46  CORD_EP_NORD = -3,
48 };
49 
63  char *regif, size_t maxlen);
64 
85 int cord_ep_register(const sock_udp_ep_t *remote, const char *regif);
86 
94 int cord_ep_update(void);
95 
103 int cord_ep_remove(void);
104 
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
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:45
@ CORD_EP_NORD
not connected to an RD
Definition: ep.h:46
@ CORD_EP_OVERFLOW
internal buffers can not handle input
Definition: ep.h:47
@ CORD_EP_TIMEOUT
no response from the network
Definition: ep.h:44
@ CORD_EP_OK
everything went as expected
Definition: ep.h:43
UDP sock definitions.
Common IP-based transport layer end point.
Definition: sock.h:211