LNP Interface: link networking protocol.
More...
#include <config.h>
#include <unistd.h>
Go to the source code of this file.
LNP Interface: link networking protocol.
- Author
- Markus L. Noga marku.nosp@m.s@no.nosp@m.ga.de
Definition in file lnp.h.
dummy addressing layer packet handler
Definition at line 61 of file lnp.h.
dummy integrity layer packet handler
Definition at line 58 of file lnp.h.
dummy remote packet handler
Definition at line 70 of file lnp.h.
typedef void(* lnp_addressing_handler_t) (const unsigned char *, unsigned char, unsigned char) |
the addressing layer packet handler type
arguments are (data,length,src_address).
Definition at line 55 of file lnp.h.
typedef void(* lnp_integrity_handler_t) (const unsigned char *, unsigned char) |
the integrity layer packet handler type
arguments are (data,length).
Definition at line 50 of file lnp.h.
typedef void(* lnp_remote_handler_t) (unsigned int) |
handler for remote
arguments are (buttonstate)
Definition at line 67 of file lnp.h.
clear last message from standard firmware
Definition at line 136 of file lnp.h.
Referenced by get_msg().
unsigned char get_msg |
( |
void |
| ) |
|
|
inline |
set an addressing layer packet handler for a port.
Definition at line 107 of file lnp.h.
int lnp_addressing_write |
( |
const unsigned char * |
data, |
|
|
unsigned char |
length, |
|
|
unsigned char |
dest, |
|
|
unsigned char |
srcport |
|
) |
| |
send a LNP addressing layer packet of given length
- Returns
- 0 on success.
set the integrity layer packet handler
Definition at line 101 of file lnp.h.
int lnp_integrity_write |
( |
const unsigned char * |
data, |
|
|
unsigned char |
length |
|
) |
| |
send a LNP integrity layer packet of given length
- Returns
- 0 on success.
set the remote packet handler
Definition at line 122 of file lnp.h.
void lnp_set_hostaddr |
( |
unsigned char |
host | ) |
|
|
inline |
set new LNP host address
Definition at line 115 of file lnp.h.
wait until receive a message
Referenced by get_msg().
int send_msg |
( |
unsigned char |
msg | ) |
|
send a standard firmware message
addressing layer packets may be directed to a variety of ports.
unsigned char lnp_hostaddr |
there are no ports for integrity layer packets, so there's just
unsigned char lnp_rcx_message |
packets from remote have no ports