Use of RAW SOCKET from WskSocket

Hi All,

When I use Socket Connect from user mode, I see after sync packet, the next ACK packet gets sent automatically. I am trying to send only the first SYN packet and receive its reply and then send new custom packet and for this I am trying to use RAW socket from WinSock Kernel for sending TCP SYN packet.

I am using custom crafted packet that needs to be sent to remote address.
The socket types defined in wsk.h

 //
 // Socket types.
 //

 #define SOCK_STREAM     1
 #define SOCK_DGRAM      2
 #define SOCK_RAW        3
 #define SOCK_RDM        4
 #define SOCK_SEQPACKET  5

 //
 // Flags denoting WSK socket types
 //

 #define WSK_FLAG_BASIC_SOCKET        0x00000000 
 #define WSK_FLAG_LISTEN_SOCKET       0x00000001
 #define WSK_FLAG_CONNECTION_SOCKET   0x00000002
 #define WSK_FLAG_DATAGRAM_SOCKET     0x0000000
 #define WSK_FLAG_STREAM_SOCKET       0x00000008

If I use SOCK_STREAM with flag WSK_FLAG_LISTEN_SOCKET, WSK_FLAG_CONNECTION_SOCKET or SOCK_DGRAM with WSK_FLAG_DATAGRAM_SOCKET , socket creation and binding works without any issue.
For RAW socket type, I am not sure which flag to use. Raw Socket created with any of mentioned flag flails during binding for with different error.
Am I going in wrong direction trying to use RAW socket here? Is there a better way for my use case. Any pointer would be valuable here.

Thanks,