RTRlib
 All Data Structures Functions Typedefs Enumerations Enumerator Groups Pages
packets.h
1 /*
2  * This file is part of RTRlib.
3  *
4  * RTRlib is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or (at your
7  * option) any later version.
8  *
9  * RTRlib is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12  * License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with RTRlib; see the file COPYING.LESSER.
16  *
17  * INET group, Hamburg University of Applied Sciences,
18  * CST group, Freie Universitaet Berlin
19  * Website: http://rpki.realmv6.org/
20  */
21 
22 #ifndef RTR_PACKETS_H
23 #define RTR_PACKETS_H
24 #include <arpa/inet.h>
25 #include "rtrlib/lib/ipv6.h"
26 #include "rtrlib/lib/ipv4.h"
27 #include "rtrlib/rtr/rtr.h"
28 
29 
30 static const unsigned int RTR_MAX_PDU_LEN = 3248; //error pdu: header(8) + len(4) + ipv6_pdu(32) + len(4) + 400*8 (400 char text)
31 static const unsigned int RTR_RECV_TIMEOUT = 60;
32 static const unsigned int RTR_SEND_TIMEOUT = 60;
33 
34 void rtr_change_socket_state(struct rtr_socket *rtr_socket, const enum rtr_socket_state new_state);
35 int rtr_sync(struct rtr_socket *rtr_socket);
36 int rtr_wait_for_sync(struct rtr_socket *rtr_socket);
37 int rtr_send_serial_query(struct rtr_socket *rtr_socket);
38 int rtr_send_reset_query(struct rtr_socket *rtr_socket);
39 
40 #endif
rtr_socket_state
States of the RTR socket.
Definition: rtr.h:56
A RTR socket.
Definition: rtr.h:113