Socket Programming IPSec

B

Babar Qaisrani

Hi
I have a query regarding socket programming . im trying to create a
dummy IPSec (ESP)header Packet . My Packet looks like
<code>
struct mypkt
{
struct iphdr ip;
struct _myesp esp;
struct tcphdr tcp;
};
and
struct _myesp {
u_int32_t esp_spi; /* ESP */
u_int32_t esp_seq; /* Sequence number */
u_int32_t esp_iv; /* Sequence number */
u_int8_t esp_padsize;
u_int8_t esp_next;
u_int32_t esp_ah; /* Sequence number */
};
</code>

But the problem is that when i send a socket using RAW socket , in
ethereal it shows IP -ESP ONLY . doesnt shows up the TCP header .
while testing a Normal IPSec implementation shows up all three layers.

Lemme know if i should paste complete code.
Any help is appreciated
Thanks
Bob
 
P

Prateek R Karandikar

Hi
I have a query regarding socket programming . im trying to create a
dummy IPSec (ESP)header Packet . My Packet looks like
<code>
struct mypkt
{
struct iphdr ip;
struct _myesp esp;
struct tcphdr tcp;
};
and
struct _myesp {
u_int32_t esp_spi; /* ESP */
u_int32_t esp_seq; /* Sequence number */
u_int32_t esp_iv; /* Sequence number */
u_int8_t esp_padsize;
u_int8_t esp_next;
u_int32_t esp_ah; /* Sequence number */
};
</code>

But the problem is that when i send a socket using RAW socket , in
ethereal it shows IP -ESP ONLY . doesnt shows up the TCP header .
while testing a Normal IPSec implementation shows up all three layers.

Lemme know if i should paste complete code.
Any help is appreciated
Thanks
Bob

Your post has no Standard C++ content, and is thus off-topic.

-- --
Abstraction is selective ignorance.
-Andrew Koenig
-- --
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,173
Messages
2,570,938
Members
47,473
Latest member
pioneertraining

Latest Threads

Top