/* File offset is actually in records, not bytes. */
static int ip_chain_procinfo(char *buffer, char **start,
- off_t offset, int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
- , int reset
-#endif
- )
+ off_t offset, int length)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
- /* FIXME: No more `atomic' read and reset. Wonderful 8-( --RR */
- int reset = 0;
-#endif
struct ip_chain *i;
struct ip_fwkernel *j = ip_fw_chains->chain;
unsigned long flags;
len = last_len;
goto outside;
}
- else if (reset)
- memset(j->counters, 0,
- sizeof(struct ip_counters)*NUM_SLOTS);
}
}
outside:
#endif /* CONFIG_IP_FIREWALL */
#if defined(CONFIG_IP_FIREWALL) || defined(CONFIG_IP_ACCT)
-
static int ip_chain_procinfo(int stage, char *buffer, char **start,
- off_t offset, int length, int reset)
+ off_t offset, int length)
{
off_t pos=0, begin=0;
struct ip_fw *i;
len = last_len;
break;
}
-/* Not possible in 2.3.29+, also allowing read lock instead of write -- JM */
-#if 0
- else if(reset)
- {
- /* This needs to be done at this specific place! */
- i->fw_pcnt=0L;
- i->fw_bcnt=0L;
- }
-#endif
last_len = len;
i=i->fw_next;
}
#endif
#ifdef CONFIG_IP_ACCT
-
static int ip_acct_procinfo(char *buffer, char **start, off_t offset,
- int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
- , int reset
-#endif
- )
+ int length)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
- /* FIXME: No more `atomic' read and reset. Wonderful 8-( --RR */
- int reset = 0;
-#endif
- return ip_chain_procinfo(IP_FW_ACCT, buffer,start, offset,length,
- reset);
+ return ip_chain_procinfo(IP_FW_ACCT, buffer,start, offset,length);
}
-
#endif
#ifdef CONFIG_IP_FIREWALL
-
static int ip_fw_in_procinfo(char *buffer, char **start, off_t offset,
- int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
- , int reset
-#endif
- )
+ int length)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
- /* FIXME: No more `atomic' read and reset. Wonderful 8-( --RR */
- int reset = 0;
-#endif
- return ip_chain_procinfo(IP_FW_IN, buffer,start,offset,length,
- reset);
+ return ip_chain_procinfo(IP_FW_IN, buffer,start,offset,length);
}
static int ip_fw_out_procinfo(char *buffer, char **start, off_t offset,
- int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
- , int reset
-#endif
- )
+ int length)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
- /* FIXME: No more `atomic' read and reset. Wonderful 8-( --RR */
- int reset = 0;
-#endif
- return ip_chain_procinfo(IP_FW_OUT, buffer,start,offset,length,
- reset);
+ return ip_chain_procinfo(IP_FW_OUT, buffer,start,offset,length);
}
static int ip_fw_fwd_procinfo(char *buffer, char **start, off_t offset,
- int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
- , int reset
-#endif
- )
+ int length)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
- /* FIXME: No more `atomic' read and reset. Wonderful 8-( --RR */
- int reset = 0;
-#endif
- return ip_chain_procinfo(IP_FW_FWD, buffer,start,offset,length,
- reset);
+ return ip_chain_procinfo(IP_FW_FWD, buffer,start,offset,length);
}
#endif