diff --git a/include/patty/ax25.h b/include/patty/ax25.h index 4490481..7b52402 100644 --- a/include/patty/ax25.h +++ b/include/patty/ax25.h @@ -16,10 +16,47 @@ #include #include #include -#include + +enum patty_ax25_event { + PATTY_AX25_IO_UNKNOWN, + PATTY_AX25_IO_RECV, + PATTY_AX25_IO_SEND, + PATTY_AX25_IO_READ, + PATTY_AX25_IO_WRITE +}; int patty_ax25_init(patty_ax25 *ax25); void patty_ax25_stop(patty_ax25 *ax25); -#endif /* _PATTY_AX25_IF */ +int patty_ax25_open(patty_ax25 *ax25, const char *ifname); + +int patty_ax25_socket(patty_ax25 *ax25); + +int patty_ax25_listen(patty_ax25 *ax25, + int socket, const char *callsign, int ssid); + +int patty_ax25_connect(patty_ax25 *ax25, + int socket, const char *callsign, int ssid); + +int patty_ax25_accept(patty_ax25 *ax25, + int socket); + +int patty_ax25_close(patty_ax25 *ax25, int fd); + +int patty_ax25_wait(patty_ax25 *ax25, + int fds, enum patty_ax25_event *ev); + +int patty_ax25_recv(patty_ax25 *ax25, + int fd, patty_ax25_frame *frame); + +int patty_ax25_send(patty_ax25 *ax25, + int fd, patty_ax25_frame *frame); + +ssize_t patty_ax25_read(patty_ax25 *ax25, + int fd, void *data, size_t len); + +ssize_t patty_ax25_write(patty_ax25 *ax25, + int fd, const void *data, size_t len); + +#endif /* _PATTY_AX25_H */ diff --git a/include/patty/ax25/io.h b/include/patty/ax25/io.h deleted file mode 100644 index 996fdad..0000000 --- a/include/patty/ax25/io.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _PATTY_AX25_IO_H -#define _PATTY_AX25_IO_H - -enum patty_ax25_io_event { - PATTY_AX25_IO_UNKNOWN, - PATTY_AX25_IO_RECV, - PATTY_AX25_IO_SEND, - PATTY_AX25_IO_READ, - PATTY_AX25_IO_WRITE -}; - -int patty_ax25_open(patty_ax25 *ax25, const char *ifname); - -int patty_ax25_socket(patty_ax25 *ax25); - -int patty_ax25_listen(patty_ax25 *ax25, - int socket, const char *callsign, int ssid); - -int patty_ax25_connect(patty_ax25 *ax25, - int socket, const char *callsign, int ssid); - -int patty_ax25_accept(patty_ax25 *ax25, - int socket); - -int patty_ax25_close(patty_ax25 *ax25, int fd); - -int patty_ax25_wait(patty_ax25 *ax25, - int fds, enum patty_ax25_io_event *ev); - -int patty_ax25_recv(patty_ax25 *ax25, - int fd, patty_ax25_frame *frame); - -int patty_ax25_send(patty_ax25 *ax25, - int fd, patty_ax25_frame *frame); - -ssize_t patty_ax25_read(patty_ax25 *ax25, - int fd, void *data, size_t len); - -ssize_t patty_ax25_write(patty_ax25 *ax25, - int fd, const void *data, size_t len); - -#endif /* _PATTY_AX25_IO_H */