~ubuntu-branches/ubuntu/lucid/rsyslog/lucid-updates

« back to all changes in this revision

Viewing changes to runtime/vmop.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-06-23 12:12:43 UTC
  • mfrom: (1.1.11 upstream) (3.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20090623121243-d2fejarzidywnn17
Tags: 4.2.0-1
* New upstream release of the now stable v4 branch.
  - Fix warnings when /etc/rsyslog.d/ is empty. Closes: #530228
* debian/patches/imudp_multiple_udp_sockets.patch
  - Removed, merged upstream.
* debian/rsyslog.default
  - Set default compat mode to '4'.
* debian/rsyslog.logcheck.ignore.server
  - Update logcheck rules files to also ignore rsyslogd and imklog stop
    messages.
* debian/control
  - Bump Standards-Version to 3.8.2. No further changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
        opcode_PUSHMSGVAR      = 1002,   /* requires var operand */
60
60
        opcode_PUSHCONSTANT    = 1003,   /* requires var operand */
61
61
        opcode_UNARY_MINUS     = 1010,
62
 
        opcode_END_PROG        = 1011
 
62
        opcode_FUNC_CALL       = 1012,
 
63
        opcode_END_PROG        = 2000
63
64
} opcode_t;
64
65
 
65
66
 
 
67
/* Additional doc, operation specific
 
68
 
 
69
  FUNC_CALL
 
70
  All parameter passing is via the stack. Parameters are placed onto the stack in reverse order,
 
71
  that means the last parameter is on top of the stack, the first at the bottom location. 
 
72
  At the actual top of the stack is the number of parameters. This permits functions to be
 
73
  called with variable number of arguments. The function itself is responsible for poping
 
74
  the right number of parameters of the stack and complaining if the number is incorrect.
 
75
  On exit, a single return value must be pushed onto the stack. The FUNC_CALL operation 
 
76
  is generic. Its pVar argument contains the function name string (TODO: very slow, make
 
77
  faster in later releases).
 
78
 
 
79
  Sample Function call:  sampleFunc(p1, p2, p3) ; returns number 4711 (sample)
 
80
  Stacklayout on entry (order is top to bottom):
 
81
  3
 
82
  p3
 
83
  p2
 
84
  p1
 
85
  ... other vars ...
 
86
 
 
87
  Stack on exit
 
88
  4711
 
89
  ... other vars ...
 
90
  
 
91
 */
 
92
 
 
93
 
66
94
/* the vmop object */
67
95
typedef struct vmop_s {
68
96
        BEGINobjInstance;       /* Data to implement generic object - MUST be the first data element! */
69
97
        opcode_t opcode;
70
98
        union {
71
 
                var_t *pVar;
72
 
                /* TODO: add function pointer */
 
99
                var_t *pVar;    /* for function call, this is the name (string) of function to be called */
73
100
        } operand;
74
101
        struct vmop_s *pNext; /* next operation or NULL, if end of program (logically this belongs to vmprg) */
75
102
} vmop_t;