ext/jail.h
changeset 7 4460fc10c6a3
parent 6 2d52adc4adcc
equal deleted inserted replaced
6:2d52adc4adcc 7:4460fc10c6a3
    74 #endif /* DEBUG */
    74 #endif /* DEBUG */
    75 
    75 
    76 
    76 
    77 #endif /* _BSDJAIL_H_ */
    77 #endif /* _BSDJAIL_H_ */
    78 
    78 
       
    79 
       
    80 /* --------------------------------------------------------------
       
    81  * Predeclarations
       
    82  * -------------------------------------------------------------- */
       
    83 
       
    84 // globals
       
    85 //
       
    86 VALUE rbjail_mBSD;
       
    87 VALUE rbjail_cBSDJail;
       
    88 VALUE rbjail_cIPAddr;
       
    89 VALUE rbjail_cPathname;
       
    90 
       
    91 // utility
       
    92 //
       
    93 static struct xprison * rbjail_check_jail( VALUE self );
       
    94 static struct xprison * rbjail_get_jailptr( VALUE self );
       
    95 static int rbjail_do_attach( int jid );
       
    96 
       
    97 // memory management
       
    98 //
       
    99 static VALUE rbjail_alloc( VALUE class, struct xprison *xp );
       
   100 static void rbjail_gc_free( struct xprison *ptr );
       
   101 static VALUE rbjail_s_alloc( VALUE class );
       
   102 
       
   103 // class
       
   104 //
       
   105 static VALUE rbjail_jail( int argc, VALUE *argv, VALUE self );
       
   106 static VALUE rbjail_find( int argc, VALUE *argv, VALUE self );
       
   107 static VALUE rbjail_find_by_jid( VALUE self, VALUE jid );
       
   108 static VALUE rbjail_class_attach( VALUE self, VALUE arg );
       
   109 static VALUE rbjail_compare( VALUE self, VALUE other );
       
   110 
       
   111 // instance
       
   112 //
       
   113 static VALUE rbjail_inspect( VALUE self );
       
   114 static VALUE rbjail_get_ip( VALUE self );
       
   115 static VALUE rbjail_get_jid( VALUE self );
       
   116 static VALUE rbjail_get_host( VALUE self );
       
   117 static VALUE rbjail_get_path( VALUE self );
       
   118 static VALUE rbjail_instance_attach( VALUE self );
       
   119 static VALUE rbjail_attach_block( int jid );
       
   120 
       
   121 void Init_jail( void );
       
   122