Skip navigation
2951 Views 6 Replies Latest reply: Feb 19, 2009 12:18 PM by Ryan Graham RSS
beza Bronze 4 posts since
Feb 17, 2009
Currently Being Moderated

Feb 17, 2009 7:17 AM

Packet Delivery

Hello

 

I am looking for a couple of days now on how to deliver an incoming packet on my openfire server to another destination (i.e. different port and ip) as well

I tried Debugging and following the packet from the moment it was read from the socket until it was deliverd to its destination

and for some reason I can't find the exact piece of code where the packet is being distributed.

 

For that purpose I downloded the mina apache server and attached its code to my openfire code

I tried everything and I can't seem to find a way to it

 

All I need is to duplicate each packet the is received by my server and send it to another port on another ip as well

so it will be send to different destinations, one is the target users that the message is suppose to go to and another destination of my choice

 

Any help would be appreciated, if anyone can direct me to that piece of code I'm looking it would be great

 

Thanks

 

P.S - My openfire version is 3.6.3

  • Ryan Graham KeyContributor 1,940 posts since
    Jan 17, 2003
    Currently Being Moderated
    Feb 18, 2009 7:49 AM (in response to beza)
    Re: Packet Delivery

    Hello,

     

    If you're looking to re--route a packet you could write a plugin that implements the PacketInterceptor interface. Once that packet has been intercepted you could open up a socket connection and send the contents of the packet to a client. For code samples you could look at the Openfire source to the Content Filter, Packet Filter or Subscription plugins.

     

    Hope that helps,

    Ryan

      • Ryan Graham KeyContributor 1,940 posts since
        Jan 17, 2003
        Currently Being Moderated
        Feb 18, 2009 1:16 PM (in response to beza)
        Re: Packet Delivery

        Hello,

         

        I don't want to discourage you but if you're not familiar with Java (or any other type of software) development trying to jump right into writing a plugin is going to be challenging. That's not to imply that writing plugins is all that difficult but most people find it easier to crawl before they try to walk. Having said that, below are two links that you can look at that should help you get up and running:

         

        * Openfire SVN + Eclipse 3.3 + Subversive Installation Guide

        * Openfire Plugin Development: Message of the Day

         

        Good luck,

        Ryan

            • Ryan Graham KeyContributor 1,940 posts since
              Jan 17, 2003
              Currently Being Moderated
              Feb 19, 2009 12:18 PM (in response to beza)
              Re: Packet Delivery

              Hello,

               

              It's good to hear you're making progress...

               

              Are you wanting to send an xmpp packet to a client that is already connected to Openfire or are you trying to send the data over just a standard Java socket?

               

              Thanks,

              Ryan

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points