[prev in list] [next in list] [prev in thread] [next in thread]
List: ipfilter
Subject: R>Marco Definition(KERNEL)
From: "Gordon Shiao" <tigershiao1 () hotmail ! com>
Date: 2001-05-29 21:58:57
[Download RAW message or body]
If it's loadable kernel modules, a macro definition IPFILTER_LKM is used
instead...
1. what are those KERNEL definitions designed for?
2. in the OS i'm developing on, KERNEL is used for its kernel code, should I
change all these KERNEL in ipfilter to another MACRO name?
thanks!!!
>perhaps something to do with loadable kernel modules vs static kernels?
>complete shot in the dark, sorry can't help much more, i'm not much of a
>coder.
>
>-----Original Message-----
>Subject: Macro Definitions(KERNEL)
>
>
>I'm trying to let the code running on a RTOS, it seems I got quite a few
>KERNEL(_KERNEL, _KERNEL_) conflicts, anybody can give me a hand?
>
>just for example, at fil.c, what's the usage of KERNEL here:
>A: ****************************************************************
>#ifndef _KERNEL
># include "ipf.h"
># include "ipt.h"
>extern int opts;
># define FR_VERBOSE(verb_pr) verbose verb_pr
># define FR_DEBUG(verb_pr) debug verb_pr
># define IPLLOG(a, c, d, e) ipllog()
>#else /* #ifndef _KERNEL */
># define FR_VERBOSE(verb_pr)
># define FR_DEBUG(verb_pr)
># define IPLLOG(a, c, d, e) ipflog(a, c, d, e)
># define FR_NEWAUTH(m, fi, ip, qif) fr_newauth((mb_t *)m, fi, ip)
>#endif /* _KERNEL */
>
>B:*******************************************************************
>void fr_makefrip(hlen, ip, fin)
>int hlen;
>ip_t *ip;
>fr_info_t *fin;
>{
> u_short optmsk = 0, secmsk = 0, auth = 0;
> int i, mv, ol, off, p, plen, v;
> fr_ip_t *fi = &fin->fin_fi;
> struct optlist *op;
> u_char *s, opt;
> tcphdr_t *tcp;
>
> fin->fin_rev = 0;
> fin->fin_fr = NULL;
> fin->fin_tcpf = 0;
> fin->fin_data[0] = 0;
> fin->fin_data[1] = 0;
> fin->fin_rule = -1;
> fin->fin_group = -1;
>#ifdef _KERNEL
> fin->fin_icode = ipl_unreach;
>#endif
> v = fin->fin_v;
> fi->fi_v = v;
>
>C:********************************************************************
>static int frflushlist __P((int, minor_t, int *, frentry_t **));
>#ifdef _KERNEL
>static void frsynclist __P((frentry_t *));
>#endif
>
>thanks in advance!
>
>Gordon
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic