udp_var.h revision 199767f8919635c4928607450d9e0abb932109ce
/*-
* Copyright (c) 1982, 1986, 1989, 1993
* The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)udp_var.h 8.1 (Berkeley) 6/10/93
* $FreeBSD$
*/
#ifndef _NETINET_UDP_VAR_H_
#define _NETINET_UDP_VAR_H_
/*
* UDP kernel structures and variables.
*/
struct udpiphdr {
};
struct inpcb;
struct mbuf;
const struct sockaddr *, void *);
/*
* UDP control block; one per udp.
*/
struct udpcb {
void *u_tun_ctx; /* Tunneling callback context. */
};
/* IPsec: ESP in UDP tunneling: */
/* .. per draft-ietf-ipsec-nat-t-ike-0[01],
* and draft-ietf-ipsec-udp-encaps-(00/)01.txt */
struct udpstat {
/* input statistics: */
/* output statistics: */
/* of no socket on port, arrived as multicast */
};
#ifdef _KERNEL
/*
* In-kernel consumers can use these accessor macros directly to update
* stats.
*/
/*
* Kernel module consumers must use this accessor macro.
*/
void kmod_udpstat_inc(int statnum);
#define KMOD_UDPSTAT_INC(name) \
#endif
/*
* Identifiers for UDP sysctl nodes.
*/
#ifdef _KERNEL
extern struct pr_usrreqs udp_usrreqs;
extern u_long udp_sendspace;
extern u_long udp_recvspace;
VNET_DECLARE(int, udp_cksum);
VNET_DECLARE(int, udp_blackhole);
extern int udp_log_in_vain;
{
}
udp_get_pcblist(int protocol)
{
}
int udp_newudpcb(struct inpcb *);
void udp_discardcb(struct udpcb *);
void udp_ctlinput(int, struct sockaddr *, void *);
void udplite_ctlinput(int, struct sockaddr *, void *);
void udp_init(void);
void udplite_init(void);
#ifdef VIMAGE
void udp_destroy(void);
void udplite_destroy(void);
#endif
void udplite_input(struct mbuf *, int);
void *ctx);
#endif /* _KERNEL */
#endif /* _NETINET_UDP_VAR_H_ */