Return to packets.h CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / bird2 / proto / rpki |
1.1 ! misho 1: /* ! 2: * BIRD -- The Resource Public Key Infrastructure (RPKI) to Router Protocol ! 3: * ! 4: * (c) 2015 CZ.NIC ! 5: * (c) 2015 Pavel Tvrdik <pawel.tvrdik@gmail.com> ! 6: * ! 7: * This file was a part of RTRlib: http://rpki.realmv6.org/ ! 8: * ! 9: * Can be freely distributed and used under the terms of the GNU GPL. ! 10: */ ! 11: ! 12: #ifndef _BIRD_RPKI_PACKETS_H_ ! 13: #define _BIRD_RPKI_PACKETS_H_ ! 14: ! 15: #include <arpa/inet.h> ! 16: ! 17: #define RPKI_PDU_HEADER_LEN 8 ! 18: ! 19: /* A Error PDU size is the biggest (has encapsulate PDU inside): ! 20: * +8 bytes (Header size) ! 21: * +4 bytes (Length of Encapsulated PDU) ! 22: * +32 bytes (Encapsulated PDU IPv6 32) ! 23: * +4 bytes (Length of inserted text) ! 24: * +800 bytes (UTF-8 text 400*2 bytes) ! 25: * ------------ ! 26: * = 848 bytes (Maximal expected PDU size) */ ! 27: #define RPKI_PDU_MAX_LEN 848 ! 28: ! 29: /* RX buffer size has a great impact to scheduler granularity */ ! 30: #define RPKI_RX_BUFFER_SIZE 4096 ! 31: #define RPKI_TX_BUFFER_SIZE RPKI_PDU_MAX_LEN ! 32: ! 33: /* Return values */ ! 34: enum rpki_rtvals { ! 35: RPKI_SUCCESS = 0, ! 36: RPKI_ERROR = -1 ! 37: }; ! 38: ! 39: int rpki_send_serial_query(struct rpki_cache *cache); ! 40: int rpki_send_reset_query(struct rpki_cache *cache); ! 41: int rpki_rx_hook(sock *sk, uint size); ! 42: void rpki_connected_hook(sock *sk); ! 43: void rpki_err_hook(sock *sk, int size); ! 44: ! 45: #endif