1/*- 2 * Copyright (c) 2010 Luigi Rizzo, Riccardo Panicucci, Universita` di Pisa 3 * All rights reserved 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27/* 28 * internal dummynet APIs. 29 * |
30 * $FreeBSD: head/sys/netinet/ipfw/ip_dn_private.h 205050 2010-03-11 22:42:33Z luigi $ |
31 */ 32 33#ifndef _IP_DN_PRIVATE_H 34#define _IP_DN_PRIVATE_H 35 36/* debugging support 37 * use ND() to remove debugging, D() to print a line, 38 * DX(level, ...) to print above a certain level --- 315 unchanged lines hidden (view full) --- 354int dummynet_io(struct mbuf **, int , struct ip_fw_args *); 355void dummynet_task(void *context, int pending); 356void dn_reschedule(void); 357 358struct dn_queue *ipdn_q_find(struct dn_fsk *, struct dn_sch_inst *, 359 struct ipfw_flow_id *); 360struct dn_sch_inst *ipdn_si_find(struct dn_schk *, struct ipfw_flow_id *); 361 |
362/* 363 * copy_range is a template for requests for ranges of pipes/queues/scheds. 364 * The number of ranges is variable and can be derived by o.len. 365 * As a default, we use a small number of entries so that the struct 366 * fits easily on the stack and is sufficient for most common requests. 367 */ 368#define DEFAULT_RANGES 5 369struct copy_range { 370 struct dn_id o; 371 uint32_t r[ 2 * DEFAULT_RANGES ]; 372}; 373 |
374struct copy_args { 375 char **start; 376 char *end; 377 int flags; 378 int type; |
379 struct copy_range *extra; /* extra filtering */ |
380}; 381 382struct sockopt; 383int ip_dummynet_compat(struct sockopt *sopt); 384int dummynet_get(struct sockopt *sopt, void **compat); 385int dn_c_copy_q (void *_ni, void *arg); 386int dn_c_copy_pipe(struct dn_schk *s, struct copy_args *a, int nq); 387int dn_c_copy_fs(struct dn_fsk *f, struct copy_args *a, int nq); 388int dn_compat_copy_queue(struct copy_args *a, void *_o); 389int dn_compat_copy_pipe(struct copy_args *a, void *_o); 390int copy_data_helper_compat(void *_o, void *_arg); 391int dn_compat_calc_size(struct dn_parms dn_cfg); 392int do_config(void *p, int l); 393 394/* function to drain idle object */ 395void dn_drain_scheduler(void); 396void dn_drain_queue(void); 397 398#endif /* _IP_DN_PRIVATE_H */ |