2 * ffi.c - ktapvm kernel module ffi library
4 * This file is part of ktap by Jovi Zhangwei.
6 * Copyright (C) 2012-2013 Jovi Zhangwei <jovi.zhangwei@gmail.com>.
8 * ktap is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License,
10 * version 2, as published by the Free Software Foundation.
12 * ktap is distributed in the hope it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 * You should have received a copy of the GNU General Public License along with
18 * this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
22 #include "../include/ktap_types.h"
23 #include "../include/ktap_ffi.h"
27 /*@TODO Design how to implement ffi helper functions 22.11 2013 (unihorn)*/
29 static int kp_ffi_new(ktap_state *ks)
31 /*@TODO finish this 08.11 2013 (houqp)*/
35 static int kp_ffi_sizeof(ktap_state *ks)
37 /*@TODO finish this 08.11 2013 (houqp)*/
41 static const ktap_Reg ffi_funcs[] = {
42 {"sizeof", kp_ffi_sizeof},
47 void kp_init_ffilib(ktap_state *ks)
49 kp_register_lib(ks, "ffi", ffi_funcs);