how to implement particular message format in NS-2 - simulation

i need a little help regarding NS-2
My question is can you implement a particular message format between two nodes in NS-2 like we create a tcp communication but if i want to send particular message eg
a certificate with information inside it such as public key or type of node time, etc.
i am trying to do it in wireless
and also can it be encrypted.
is there any example or sample code or snippet you can share

Creation of your own packets in aodv is so easy. Have a look at it.
http://karthicksivakrr.blogspot.in/2014/02/how-can-i-create-my-own-packets-in-aodv.html

Related

Zeek Packet Analysis for all protocols

I realize Zeek is capable of analyzing packets for a specific protocol using the API. I want to be able to retrieve all packets without being specific to a protocol and create a packets.log type file with uids that can be correlated with the conn.log. I have been searching through the API documentation trying to find a way to do this (all protocols) but have been unsuccessful. Does anyone have any suggestions? Thank you.

Architecture diagram involving the flow of data between trading engine, order routing engine,quickfix and the exchange

If I write an order routing system based on QuickfixJ, can I just start submitting my trades to an exchange? Or do I need to register myself with the exchange or get permission or something like that?
I am not able to understand how QuickfixJ, the order routing system, the actual trading engine and the exchange fits together. Any online architecture diagram would be very helpful for how these components fit together.
FIX is just a transmission protocol. By itself, it's pretty dumb. QuickFIX (any language port) is just an engine that does all the boring dirty work of managing a FIX connection.
The FIX specification includes a list of messages and fields. In reality, you can treat these as suggestions that, in practice, no commercial FIX counterparty uses as-is. Every counterparty I've connected to makes modifications to those messages and fields, sometimes adding entirely new messages. No counterparty supports every message and field.
When connecting to a counterparty, do not assume anything. Your counterparty should provide documentation on how they expect their interface to be used, and which messages and fields they will send and which they expect to receive from you.
Their docs should tell you which message to send them to request market data and any special fields/options you must use.
Their docs will tell you how to submit a trade.
Their docs will tell you how to do anything that they support, and which messages/fields you will receive in return.
Do not try to send any message type to your counterparty unless their docs say they support it.
If you are writing the ORS side... then you have no docs. If you haven't written a FIX client before, you probably shouldn't be writing a FIX server without some assistance from someone who has. At the least, you should try to get ahold of some other systems' FIX interface docs to get an idea of how to go about it. (Unfortunately, such firms usually only give them to client-developers.)

Intercept and filter incoming packets at run time in Tigase (XMPP)

I am using Tigase(XMPP) server. I want to block every incoming message from a particular JID. At the moment i am blocking a particular JID by dropping it's packet in Message.java inside
/tigase/xmpp/impl
package. Is it the right way to do this, if not please guide me.
Thanks
An advantage of blocking messages in Message plugin is that the performance penalty for this filtering is reduced to minimal. However there are quite a few disadvantages of doing it this way:
You modify Tigase's code which makes you version update painful and time consuming
It does not allow you to filter out any other packets (such as presence or iq)
Even if you block messages in Message plugin this message may still be processed by other plugins which intercept messages (such as offline message, message archiver, etc...)
Now, what is the best way to implement such a filtering it depends on what you really want to do and why do you want to do it. Have you heard of privacy lists? Please take a look at it. Tigase fully implements privacy lists, why you do not want to use them? Why you cannot use them?
Usually such a filtering you speak about is done in the Tigase filter called preprocessor. Please take a look at the privacy lists plugin or domain filter for a code example.

Connect to specific port on ip

Maybe pretty basic question, but I can't find a basic example or explanation.
I want to make a connection to 192.168.0.10 with port nr 35000
When I have a connection, I want to post AT commands and/or create a socket stream.
How do I code this in iOS? I have seen an example with NSPort, but I can't find it anymore :(
Objective is to create a connection and keep it open through several views. And also post different commands to retreive data and display it on the different views.
Hope someone can point me in the right direction.
Kind regards,
Robert

Is it possible to open multiple ports on one program?

I am programming a bot that would emulate different users on one site. If all on the same port I wouldn't know a way to identify which virtual user should receive a data packet. I thought about opening multiple ports on one program, googled it, but I couldn't find information. Is it possible?
Yes, you can open multiple sockets, each listening on a different port.
The question is, do you need it?
If all on the same port I wouldn't know a way to identify which virtual user should receive a data packet.
You can build this into the protocol, for example a message consist of first the identifier of the user (fixed number of bytes), then the size of the message (eg: stored with an int32_t) and then the actual message.