Hi,
not sure which layer you are using to send. You could try setting-up a
sink at the server, and having sources on every client sending to the
same socket.
To customize packet, you could write some class, with specific fields,
and Serialize() and Deserialize() and GetSerializedSize() in it. I
suggest you have a look at src/routing/olsr since this is a routing
algorithm relying on point-point communications. My code after looked
through olsr, looked like this:
=====================================================================================
PacketHeader p_header;
p_header.SetPacketVersion();
p_header.SetPacketLength();
MessageHeader m_header;
m_header.SetMessageType();
m_header.SetTimeToLive(1);
m_header.SetMessageSequenceNumber();
m_header.SetOriginatorAddress(my_id);
MessageHeader::Beacon &beacon = m_header.GetBeacon();
beacon.SetBufferMap();
// construct beacon message
Ptr<Packet> beacon_msg = Create<Packet>();
beacon_msg->AddHeader(m_header);
// construct a packet containing p_header and beacon_msg
Ptr<Packet> beacon_pkt = Create<Packet>();
beacon_pkt->AddHeader(p_header);
beacon_pkt->AddAtEnd(beacon_msg);
socket->Send(beacon_pkt);
==============================================================
Hope this helps.
Zhang Bo