3 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
4 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
5 * Copyright (C) 2010 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #define PROTO_UDP_CONN_STATE_NEW 0x1
28 /* UDP connection structure */
29 typedef struct proto_udp_conn_context
{
30 struct proto_udp_conn_context
*next
, *prev
;
52 /* UDP connection structure */
53 typedef struct proto_udp6_conn_context
{
54 struct proto_udp6_conn_context
*next
, *prev
;
74 /* UDP layer structure */
75 typedef struct proto_udp_t
{
76 net_port port_source
; // 2
77 net_port port_dest
; // 4
79 unsigned short len
; // 6
81 unsigned short checksum
; // 8
86 extern int net_proto_udp_anycast (int fd
);
87 extern int net_proto_udp_port (int fd
, net_port port
);
88 extern unsigned init_net_proto_udp ();
89 extern unsigned init_net_proto_udp6 ();