{
    "mode": "man",
    "parameter": "ffi",
    "section": "3",
    "url": "https://www.chedong.com/phpMan.php/man/ffi/3/json",
    "generated": "2026-05-30T06:05:06Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "FFI — Foreign Function Interface\n",
            "subsections": []
        },
        "LIBRARY": {
            "content": "libffi, -lffi\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "#include <ffi.h>",
                    "content": "ffistatus\nffiprepcif(fficif *cif, ffiabi abi, unsigned int nargs, ffitype *rtype,\nffitype atypes);\n\nvoid\nffiprepcifvar(fficif *cif, ffiabi abi, unsigned int nfixedargs, unsigned int ntotalargs,\nffitype *rtype, ffitype atypes);\n\nvoid\nfficall(fficif *cif, void (*fn)(void), void *rvalue, void avalue);\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The foreign function interface provides a mechanism by which a function can generate a call to\nanother function at runtime without requiring knowledge of the called function's interface at\ncompile time.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ffiprepcif(3), ffiprepcifvar(3), fficall(3)\n\nFebruary 15, 2008",
            "subsections": []
        }
    },
    "summary": "FFI — Foreign Function Interface",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "ffiprepcif",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/ffiprepcif/3/json"
        },
        {
            "name": "ffiprepcifvar",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/ffiprepcifvar/3/json"
        },
        {
            "name": "fficall",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/fficall/3/json"
        }
    ]
}