- ›
- Forums ›
- Help for Ns2 Projects, Ns2 Code, Matlab Projects, Matlab Code, etc., ›
- Whitelist implementation in ns2
Probably, no one will provide you any ready-made answer/code to this question.
According to my understanding, this can be implemented at tcl level ns2 simulation itself. For that, you can extend the class Agent/Messagepassing to behave as your protocol. (you have to extend the send and recv functions in your tcl code and write the protocol).
If you want to do it in a hard way, then you can do the same thing in c++ level code (you can extend the fuctionalities of messagepassing.cc and messagepassing.h)
Or you can write a new application level Agent or routing agent to handle this kind of communication scenario – but it will be more complex than the above two.
Thanks for the reply …
i thought of a better method of doing it .
This is how it will work and reduce the complexities
Steps:
1. User connects from client H to the request router R.
2. The request router R will have a hash function that will take User ip address and website address user wants to connect to as input and generate a server id.
H( U ip , W add ) -> Sid
then it looks up the S ip that maps to the Server id. say its server A’s IP address which is returned to the user.
3. When user connects to the server A , the server A will have same hash function which will get the user ip address and website which he wants to connect to and get the server id and check if its the same as its, then only it will allow user to connect to it and access the content.
Else it will drop the connection request.
So no need of the complexities as before.
Any suggestions on this method ..
Discuss Through WhatsApp