[insert project logo here (125x200px max)]

Navigator

Mailinglists

Please report any errors or ommissions you find to our `Help' mailinglist, or post a message in the Forums.

Copyright and Licensing Information

Snap is (c) Jonathan T. Moore, 1999-2002 and licensed under the GNU General Public License (GPL).

All other parts of Splash are (c) Willem de Bruijn, 2002-2003 and licensed under the BSD Open Source License.

All sourcecode is made publicly available.

Acknowledgement

Splash and the Splash website are hosted by SourceForge.net

SourceForge.net Logo

osi-open source certified logo

Splash - Documentation

SNMP Plus a Lightweight API for SNAP Handling

Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

snap-1.1-wjdb/lib/dyncheck.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.


Defines

#define DYNCHECK_RET(expr, retv)
#define DYNCHECK(expr)   DYNCHECK_RET(expr,-1)
#define DYNCHECK_IN_HEAP(ho)
#define DYNCHECK_ADDR_IN_HEAP(ho)

Define Documentation

#define DYNCHECK expr       DYNCHECK_RET(expr,-1)
 

Definition at line 35 of file dyncheck.h.

#define DYNCHECK_ADDR_IN_HEAP ho   
 

Value:

DYNCHECK((((void *)(ho) >= p->heap_min) &&          \
        ((void *)(ho) < p->heap_max) &&         \
        (((void *)(ho) + sizeof(uint32) +       \
          sizeof(heap_obj)) <= p->heap_max)) ||     \
       (((void *)(ho) >= (void *)p->stack_max) &&       \
        ((void *)(ho) < p->h_alloc_heap_max) &&     \
        (((void *)(ho) + sizeof(uint32) +       \
          sizeof(heap_obj)) <= p->h_alloc_heap_max)))

Definition at line 52 of file dyncheck.h.

#define DYNCHECK_IN_HEAP ho   
 

Value:

DYNCHECK((((void *)(ho) >= p->heap_min) &&              \
        ((void *)(ho) < p->heap_max) &&             \
        (((void *)(ho) +                        \
          ((ho)->len + sizeof(heap_obj))) <= p->heap_max)) ||   \
       (((void *)(ho) >= (void *)p->stack_max) &&           \
        ((void *)(ho) < p->h_alloc_heap_max) &&         \
        (((void *)(ho) +                        \
          ((ho)->len + sizeof(heap_obj))) <= p->h_alloc_heap_max)))

Definition at line 42 of file dyncheck.h.

#define DYNCHECK_RET expr,
retv   
 

Value:

{ if (!(expr)) {                                                          \
      fprintf(stderr,"%s:%d: dynamic check '%s' failed, dropping packet\n", \
              __FILE__,__LINE__,__STRING(expr));                            \
      fflush(stderr);                                                       \
      return (retv);                                                        \
    }                                                                       \
  }

Definition at line 15 of file dyncheck.h.