sendrecvmsg.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef PHP_SENDRECVMSG_H
  2. #define PHP_SENDRECVMSG_H 1
  3. #include <php.h>
  4. #include "conversions.h"
  5. /* for sockets.c */
  6. PHP_FUNCTION(socket_sendmsg);
  7. PHP_FUNCTION(socket_recvmsg);
  8. PHP_FUNCTION(socket_cmsg_space);
  9. void php_socket_sendrecvmsg_init(INIT_FUNC_ARGS);
  10. void php_socket_sendrecvmsg_shutdown(SHUTDOWN_FUNC_ARGS);
  11. int php_do_setsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname, zval *arg4);
  12. int php_do_getsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname, zval *result);
  13. /* for conversions.c */
  14. typedef struct {
  15. int cmsg_level; /* originating protocol */
  16. int cmsg_type; /* protocol-specific type */
  17. } anc_reg_key;
  18. typedef size_t (calculate_req_space)(const zval *value, ser_context *ctx);
  19. typedef struct {
  20. socklen_t size; /* size of native structure */
  21. socklen_t var_el_size; /* size of repeatable component */
  22. calculate_req_space *calc_space;
  23. from_zval_write_field *from_array;
  24. to_zval_read_field *to_array;
  25. } ancillary_reg_entry;
  26. ancillary_reg_entry *get_ancillary_reg_entry(int cmsg_level, int msg_type);
  27. #endif