1 /*
2 * Copyright (c) 2001, 2003, 2005, 2008, 2009, 2010, 2011, 2012
3 * Inferno Nettverk A/S, Norway. 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. The above copyright notice, this list of conditions and the following
9 * disclaimer must appear in all copies of the software, derivative works
10 * or modified versions, and any portions thereof, aswell as in all
11 * supporting documentation.
12 * 2. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by
15 * Inferno Nettverk A/S, Norway.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 * Inferno Nettverk A/S requests users of this software to return to
31 *
32 * Software Distribution Coordinator or sdc@inet.no
33 * Inferno Nettverk A/S
34 * Oslo Research Park
35 * Gaustadall�en 21
36 * NO-0349 Oslo
37 * Norway
38 *
39 * any improvements or extensions that they make and grant Inferno Nettverk A/S
40 * the rights to redistribute these changes.
41 *
42 */
43
44 #include "common.h"
45
46 #include <math.h> /* XXX */
47
48 static const char rcsid[] =
49 "$Id: bandwidth.c,v 1.32 2013/01/02 13:22:40 karls Exp $";
50
51 const char module_bandwidth_version[] =
52 "$Id: bandwidth.c,v 1.32 2013/01/02 13:22:40 karls Exp $";
53
54
55 void
bw_use(bw,cinfo,lock)56 bw_use(bw, cinfo, lock)
57 shmem_object_t *bw;
58 const clientinfo_t *cinfo;
59 const int lock;
60 {
61
62 (void)bw;
63 }
64
65 void
bw_unuse(bw,cinfo,lock)66 bw_unuse(bw, cinfo, lock)
67 shmem_object_t *bw;
68 const clientinfo_t *cinfo;
69 const int lock;
70 {
71
72 (void)bw;
73 }
74
75 ssize_t
bw_left(bw,lock)76 bw_left(bw, lock)
77 const shmem_object_t *bw;
78 const int lock;
79 {
80
81 (void)bw;
82 return SOCKD_BUFSIZE;
83 }
84
85 void
bw_update(bw,bwused,bwusedtime,lock)86 bw_update(bw, bwused, bwusedtime, lock)
87 shmem_object_t *bw;
88 size_t bwused;
89 const struct timeval *bwusedtime;
90 const int lock;
91 {
92
93 (void)bw;
94 (void)bwused;
95 (void)bwusedtime;
96 }
97
98 int
bw_rulehasoverflown(rule,tnow,overflowok)99 bw_rulehasoverflown(rule, tnow, overflowok)
100 const struct rule_t *rule;
101 const struct timeval *tnow;
102 struct timeval *overflowok;
103 {
104
105 return 0;
106 }
107