I started by implement ISakmp protocol for key management, I design the header according to standard and now try to run this code but it has an error and I don't know why, please can you help me?
*
* network topology.cc
*
* Created on: Jun 11, 2017
* Author: shimaa
*/
#include "ns3/log.h"
#include "ns3/assert.h"
#include "ns3/packet.h"
#include "ns3/node.h"
#include "ns3/object-vector.h"
#include "ns3/ipv4-route.h"
#include "udp-header.h"
#include "udp-socket-factory-impl.h"
#include "udp-socket-impl.h"
#include "isakmp_header.h"
#include "ns3/packet.h"
#include "ns3/header.h"
#include "ns3/ipv4-header.h"
#include "ns3/udp-header.h"
using namespace ns3;
void DefaultPrint (void)
{
// We create a packet with 1000 bytes of zero payload
// and add 3 headers to this packet.
Ptr<Packet> p = Create<Packet> (1000);
Ipv4Header ipv4;
UdpHeader udp;
IsakmpHeader header;
ipv4.SetSource (Ipv4Address ("192.168.0.1"));
ipv4.SetDestination (Ipv4Address ("192.168.0.2"));
udp.SetSourcePort (500);
udp.SetDestinationPort (500);
udp.ForcePayloadSize(1000);
header.SetInitiatorCookie(0x613ff3c5eebdb44);
header.SetResponderCookie(0000000000000000);
header.SetNextPayload(1);
header.SetMjrversion(0x1);
header.SetMinversion(0x0);
header.SetExchangeType(2);
header.SetFlag(0x00);
header.SetMsgId(0x00000000);
header.SetMsgLength(0x000000FF);
p->AddHeader (udp);
p->AddHeader (ipv4);
p->AddHeader(header);
std::cout << "full packet size=" << p->GetSize () << std::endl;
// Here, invoke the default Print routine, directed to std out
p->Print (std::cout);
std::cout << std::endl;
return; }