Implements XreadLocalHostAddr()
More...
#include <errno.h>
#include "Xsocket.h"
#include "Xinit.h"
#include "Xutil.h"
|
| int | XupdateDAG (int sockfd, int interface, const char *rdag, const char *r4id) |
| | update the DAG for an interface More...
|
| |
| int | XupdateRV (int sockfd, int interface) |
| | update the rendezvous service of our new address More...
|
| |
| int | XreadLocalHostAddr (int sockfd, char *localhostDAG, unsigned lenDAG, char *local4ID, unsigned len4ID) |
| | retrieve the DAG and 4ID associated with this socket. More...
|
| |
| int | XisDualStackRouter (int sockfd) |
| |
| #define MAX_RV_DAG_SIZE 1024 |
| int XisDualStackRouter |
( |
int |
sockfd | ) |
|
| int XreadLocalHostAddr |
( |
int |
sockfd, |
|
|
char * |
localhostDAG, |
|
|
unsigned |
lenDAG, |
|
|
char * |
local4ID, |
|
|
unsigned |
len4ID |
|
) |
| |
The DAG and 4ID assigned by the XIA stack. This call retrieves them so that they can be used for creating DAGs or for other purposes in user applications.
- Parameters
-
| sockfd | an Xsocket (may be of any type XSOCK_STREAM, etc...) |
| localhostDAG | buffer to receive the default DAG for this host |
| lenDAG | size of the localhostDAG buffer |
| local4ID | buffer to receive 4ID for this host (if known) |
| len4ID | size of the 4ID buffer |
- Returns
- 0 on success
-
-1 on failure with errno set
| int XupdateDAG |
( |
int |
sockfd, |
|
|
int |
interface, |
|
|
const char * |
rdag, |
|
|
const char * |
r4id |
|
) |
| |
Each interface has a DAG associated with it. This API allows a user space application to change the DAG for a given interface
- Parameters
-
| sockfd | a previously allocated Xsocket |
| interface | the interface whose DAG needs to be changed |
| rdag | the router's DAG |
| r4id | the router's 4ID |
- Returns
- -1 on failure
-
0 on success
| int XupdateRV |
( |
int |
sockfd, |
|
|
int |
interface |
|
) |
| |
When we join a new network, if there is a rendezvous service associated with the interface that migrated, we send a notification to the service of our new address.
- Todo:
- require feedback response from the rendezvous service control plane
This is a one time message with no feedback. So if the message is lost the rendezvous service won't be able to forward packets.
- Parameters
-
| sockfd | a previously created XSocket |
| interface | the interface that just joined a new network or came up |
- Returns
- 0 on success
-
-1 on failure