Commit a4b3ed9f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Introduce IOCTL_AFD_WINE_GET_INFO.

parent 414b31bc
...@@ -158,6 +158,7 @@ struct afd_get_events_params ...@@ -158,6 +158,7 @@ struct afd_get_events_params
#define IOCTL_AFD_WINE_MESSAGE_SELECT CTL_CODE(FILE_DEVICE_NETWORK, 215, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_AFD_WINE_MESSAGE_SELECT CTL_CODE(FILE_DEVICE_NETWORK, 215, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_GETPEERNAME CTL_CODE(FILE_DEVICE_NETWORK, 216, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_AFD_WINE_GETPEERNAME CTL_CODE(FILE_DEVICE_NETWORK, 216, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_DEFER CTL_CODE(FILE_DEVICE_NETWORK, 217, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_AFD_WINE_DEFER CTL_CODE(FILE_DEVICE_NETWORK, 217, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_GET_INFO CTL_CODE(FILE_DEVICE_NETWORK, 218, METHOD_BUFFERED, FILE_ANY_ACCESS)
struct afd_create_params struct afd_create_params
{ {
...@@ -218,4 +219,9 @@ struct afd_message_select_params ...@@ -218,4 +219,9 @@ struct afd_message_select_params
int mask; int mask;
}; };
struct afd_get_info_params
{
int family, type, protocol;
};
#endif #endif
...@@ -2515,6 +2515,23 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) ...@@ -2515,6 +2515,23 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 1; return 1;
} }
case IOCTL_AFD_WINE_GET_INFO:
{
struct afd_get_info_params params;
if (get_reply_max_size() < sizeof(params))
{
set_error( STATUS_BUFFER_TOO_SMALL );
return 0;
}
params.family = sock->family;
params.type = sock->type;
params.protocol = sock->proto;
set_reply_data( &params, sizeof(params) );
return 0;
}
default: default:
set_error( STATUS_NOT_SUPPORTED ); set_error( STATUS_NOT_SUPPORTED );
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment