Navigation


Changeset 1176:f0b328ea2fdb in freeDiameter


Ignore:
Timestamp:
Jun 3, 2013, 3:18:43 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Added initial support for hooks in the dbg_interactive extension

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • doc/dbg_interactive.py.sample

    r1169 r1176  
    665665############# HOOKS ############
    666666
    667 # TODO
     667def my_hook_cb(type, msg, peer, other, oldpmd):
     668    print "callback type ", type, " called: ", msg, other, oldpmd
     669    return "this is the new pmd"
     670
     671# Create a wrapped fd_hook_data_hdl:
     672datahdl = fd_hook_data_hdl()
     673
     674# Register the hook callback:
     675hdl = fd_hook_hdl(1 << HOOK_MESSAGE_SENT, my_hook_cb, datahdl)
     676
     677
     678
    668679
    669680############# PEERS ############
  • extensions/dbg_interactive/CMakeLists.txt

    r882 r1176  
    3030        endpoints.i
    3131        posix.i
     32        hooks.i
    3233        )
    3334SET_SOURCE_FILES_PROPERTIES(dbg_interactive.i PROPERTIES SWIG_MODULE_NAME fDpy)
  • extensions/dbg_interactive/dbg_interactive.i

    r1169 r1176  
    205205%include "events.i"
    206206%include "endpoints.i"
     207%include "hooks.i"
    207208
    208209%include "posix.i"
Note: See TracChangeset for help on using the changeset viewer.