Data Structures |
struct | DCDevice |
| Remote device structure. More...
|
Defines |
#define | NETPP_PROTOCOL_VERSION 0x01 |
| Netpp protocol version.
|
#define | DISCOVERY_PORT 7208 |
| Port for netpp discovery.
|
Typedefs |
typedef struct DCDevice | RemoteDevice |
| Remote device structure.
|
typedef void(* | LogCallback )(const char *fmt, va_list argp) |
| Event logging callback function pointer.
|
Functions |
int | handle_sockerr (int error, const char *txt) |
| Handle Socket error.
|
int | net_send_packet (Peer *peer, PropertyPacketHdr *h, const char *data, size_t len) |
| Send network packet.
|
int | net_openbyname (RemoteDevice *d, const char *name, int(*con_init)(Peer *p, int bufsize)) |
| Open remote connection by name.
|
uint32_t | local_getroot (struct DCDevice *d) |
| Get Root node token.
|
int | slave_handler (RemoteDevice *d) |
| Enters the slave handler reacting to a property protocol request.
|
int | device_write (struct DCDevice *d, uint32_t addr, const unsigned char *buf, unsigned long size) |
| Device backend write register or memory function.
|
int | device_read (struct DCDevice *d, uint32_t addr, unsigned char *buf, unsigned long size) |
| Device backend read register.
|
void | register_proplist (struct device_desc_t *d, int n) |
| Register property list with netpp backend (Slave side).
|
int | str_fromip (char name[], unsigned long ip, unsigned short port) |
| Convert IP long to string.
|
int | protocol_request (RemoteDevice *d, int request) |
| Internal protocol request.
|
int | tcp_openbyname (RemoteDevice *d, const char *addr) |
| Master: Explicit opening of a TCP connection.
|
int | tcp_getremoteaddr (RemoteDevice *d, unsigned long *ip, unsigned short *port) |
| Get remote IP from TCP.
|
int | tcp_cleanup (RemoteDevice *d) |
| Clean up TCP connection This simply closes the socket and is the default cleanup function if a Peer has disconnected.
|
void | tcp_set_disconnect_cleanup (RemoteDevice *d, int(*cleanup)(struct DCDevice *d)) |
| Set TCP cleanup function.
|
int | usb_server_init (Peer *p) |
| USB server init function.
|
int | usb_server_exit (Peer *p) |
| USB server deinitialization.
|
int | dev_server_init (Peer *p) |
| DEV server init function.
|
int | dev_server_exit (Peer *p) |
| DEV server deinitialization.
|
Variables |
void(* | netpp_log )(int log_level, const char *fmt,...) |
| Log function pointer.
|