ffi.3 850 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. .Dd February 15, 2008
  2. .Dt FFI 3
  3. .Sh NAME
  4. .Nm FFI
  5. .Nd Foreign Function Interface
  6. .Sh LIBRARY
  7. libffi, -lffi
  8. .Sh SYNOPSIS
  9. .In ffi.h
  10. .Ft ffi_status
  11. .Fo ffi_prep_cif
  12. .Fa "ffi_cif *cif"
  13. .Fa "ffi_abi abi"
  14. .Fa "unsigned int nargs"
  15. .Fa "ffi_type *rtype"
  16. .Fa "ffi_type **atypes"
  17. .Fc
  18. .Ft void
  19. .Fo ffi_prep_cif_var
  20. .Fa "ffi_cif *cif"
  21. .Fa "ffi_abi abi"
  22. .Fa "unsigned int nfixedargs"
  23. .Fa "unsigned int ntotalargs"
  24. .Fa "ffi_type *rtype"
  25. .Fa "ffi_type **atypes"
  26. .Fc
  27. .Ft void
  28. .Fo ffi_call
  29. .Fa "ffi_cif *cif"
  30. .Fa "void (*fn)(void)"
  31. .Fa "void *rvalue"
  32. .Fa "void **avalue"
  33. .Fc
  34. .Sh DESCRIPTION
  35. The foreign function interface provides a mechanism by which a function can
  36. generate a call to another function at runtime without requiring knowledge of
  37. the called function's interface at compile time.
  38. .Sh SEE ALSO
  39. .Xr ffi_prep_cif 3 ,
  40. .Xr ffi_prep_cif_var 3 ,
  41. .Xr ffi_call 3