!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/src/linux-headers-4.4.0-210/include/linux/   drwxr-xr-x
Free 9.86 GB of 29.4 GB (33.52%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ratelimit.h (1.89 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#ifndef _LINUX_RATELIMIT_H
#define _LINUX_RATELIMIT_H

#include <linux/param.h>
#include <linux/spinlock.h>

#define DEFAULT_RATELIMIT_INTERVAL    (5 * HZ)
#define DEFAULT_RATELIMIT_BURST        10

struct ratelimit_state {
    raw_spinlock_t    lock;        /* protect the state */

    int        interval;
    int        burst;
    int        printed;
    int        missed;
    unsigned long    begin;
};

#define RATELIMIT_STATE_INIT(name, interval_init, burst_init) {        \
        .lock        = __RAW_SPIN_LOCK_UNLOCKED(name.lock),    \
        .interval    = interval_init,            \
        .burst        = burst_init,                \
    }

#define RATELIMIT_STATE_INIT_DISABLED                    \
    RATELIMIT_STATE_INIT(ratelimit_state, 0, DEFAULT_RATELIMIT_BURST)

#define DEFINE_RATELIMIT_STATE(name, interval_init, burst_init)        \
                                    \
    struct ratelimit_state name =                    \
        RATELIMIT_STATE_INIT(name, interval_init, burst_init)    \

static inline void ratelimit_state_init(struct ratelimit_state *rs,
                    int interval, int burst)
{
    raw_spin_lock_init(&rs->lock);
    rs->interval = interval;
    rs->burst = burst;
    rs->printed = 0;
    rs->missed = 0;
    rs->begin = 0;
}

extern struct ratelimit_state printk_ratelimit_state;

extern int ___ratelimit(struct ratelimit_state *rs, const char *func);
#define __ratelimit(state) ___ratelimit(state, __func__)

#ifdef CONFIG_PRINTK

#define WARN_ON_RATELIMIT(condition, state)            \
        WARN_ON((condition) && __ratelimit(state))

#define WARN_RATELIMIT(condition, format, ...)            \
({                                \
    static DEFINE_RATELIMIT_STATE(_rs,            \
                      DEFAULT_RATELIMIT_INTERVAL,    \
                      DEFAULT_RATELIMIT_BURST);    \
    int rtn = !!(condition);                \
                                \
    if (unlikely(rtn && __ratelimit(&_rs)))            \
        WARN(rtn, format, ##__VA_ARGS__);        \
                                \
    rtn;                            \
})

#else

#define WARN_ON_RATELIMIT(condition, state)            \
    WARN_ON(condition)

#define WARN_RATELIMIT(condition, format, ...)            \
({                                \
    int rtn = WARN(condition, format, ##__VA_ARGS__);    \
    rtn;                            \
})

#endif

#endif /* _LINUX_RATELIMIT_H */

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.006 ]--