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.
◆ LNP_DUMMY_ADDRESSING
dummy addressing layer packet handler
Definition at line 61 of file lnp.h.
◆ LNP_DUMMY_INTEGRITY
dummy integrity layer packet handler
Definition at line 58 of file lnp.h.
◆ LNP_DUMMY_REMOTE
dummy remote packet handler
Definition at line 70 of file lnp.h.
◆ lnp_addressing_handler_t
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.
◆ lnp_integrity_handler_t
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.
◆ lnp_remote_handler_t
typedef void(* lnp_remote_handler_t) (unsigned int) |
handler for remote
arguments are (buttonstate)
Definition at line 67 of file lnp.h.
◆ clear_msg()
◆ get_msg()
unsigned char get_msg |
( |
void |
| ) |
|
|
inline |
◆ lnp_addressing_set_handler()
set an addressing layer packet handler for a port.
Definition at line 107 of file lnp.h.
◆ lnp_addressing_write()
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.
Referenced by get_msg().
◆ lnp_integrity_set_handler()
set the integrity layer packet handler
Definition at line 101 of file lnp.h.
◆ lnp_integrity_write()
int lnp_integrity_write |
( |
const unsigned char * |
data, |
|
|
unsigned char |
length |
|
) |
| |
send a LNP integrity layer packet of given length
- Returns
- 0 on success.
Referenced by get_msg().
◆ lnp_remote_set_handler()
◆ lnp_set_hostaddr()
void lnp_set_hostaddr |
( |
unsigned char |
host | ) |
|
|
inline |
◆ msg_received()
wait until receive a message
Referenced by clear_msg().
◆ send_msg()
int send_msg |
( |
unsigned char |
msg | ) |
|
◆ lnp_addressing_handler
addressing layer packets may be directed to a variety of ports.
◆ lnp_hostaddr
unsigned char lnp_hostaddr |
◆ lnp_integrity_handler
there are no ports for integrity layer packets, so there's just
◆ lnp_rcx_message
unsigned char lnp_rcx_message |
◆ lnp_remote_handler
packets from remote have no ports