From vea at inicia.es Sun Nov 5 19:14:28 2006 From: vea at inicia.es (Jordi Vea) Date: Mon Nov 6 10:25:07 2006 Subject: [snmp] TrapPduv1.getIpAddress() returns negative values Message-ID: <454E2A04.3050808@inicia.es> Hello, I'm quite new using the stack (v 5.1), but I have detected a strange behaviour with the TrapPduv1. I'm receiving traps from a SNMP agent at the IP 192.168.10.60, but the stack gets the IP as -64.-88.10.60. ( -64=192-256, -88=168-256 ) I sniffed the SNMP PDU using Ethereal, and the Agent Address was ok, so I think this might be a bug from the stack. It has an easy work around, but has anyone detected this behaviour before? Thanks, Jordi Vea From birgit at westhawk.co.uk Mon Nov 6 13:07:57 2006 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Mon Nov 6 13:08:15 2006 Subject: [snmp] TrapPduv1.getIpAddress() returns negative values In-Reply-To: <454E2A04.3050808@inicia.es> References: <454E2A04.3050808@inicia.es> Message-ID: <20061106130757.GG2369@westhawk.co.uk> Hi Jordi, I've never seen this behaviour before. I just run the snmpv1 examples ReceiveTrap (on one machine) & SendTrap (on the other machine) against each other, using jdk 1.4 on Linux, successfully. run 1: trap id 1, v SNMPv1 from host 192.67.4.53, sent from port 33504 run 2: raw pdu v SNMPv1 from host 192.67.4.53, sent from port 33504 Which platform do you run the stack? Which jdk do you use? Which IP address are you talking about? - the TrapPduv1.getIpAddress() - TrapEvent.getPdu().getContext().getHost() - something else What do you use to print the IP address? Cheers, Birgit On Sun, Nov 05, 2006 at 07:14:28PM +0100, Jordi Vea wrote: > Hello, > > I'm quite new using the stack (v 5.1), but I have detected a strange > behaviour with the TrapPduv1. > I'm receiving traps from a SNMP agent at the IP 192.168.10.60, but > the stack gets the IP as -64.-88.10.60. ( -64=192-256, -88=168-256 ) > I sniffed the SNMP PDU using Ethereal, and the Agent Address was ok, > so I think this might be a bug from the stack. It has an easy work > around, but has anyone detected this behaviour before? > > Thanks, > Jordi Vea -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- tel.: +44 (0)161 237 0660 -- From jbers at bbn.com Mon Nov 6 13:29:06 2006 From: jbers at bbn.com (Josh Bers) Date: Mon Nov 6 18:29:44 2006 Subject: [snmp] TrapPduv1.getIpAddress() returns negative values In-Reply-To: <20061106130757.GG2369@westhawk.co.uk> Message-ID: <000001c701d1$72110860$010010ac@JBERS2> This may be an issues with Java and not with the stack. Since Java assumes all byte variables represent signed integers if you print them as such they will appear as negative values, which would explain why you see -64.-88.10.60. This is in fact the correct IP address (192.168.10.60). So it sounds like your problem may just be one of representing the ip addresses as strings. What function are you using to print them out? Josh Bers Mobile Networking Systems BBN Technologies jbers@bbn.com ph. 617.873.4262 fax. 617.873.4523 www.bbn.com > -----Original Message----- > From: snmp-bounces@snmp.westhawk.co.uk > [mailto:snmp-bounces@snmp.westhawk.co.uk] On Behalf Of Birgit > Arkesteijn > Sent: Monday, November 06, 2006 8:08 AM > To: List for discussion of the Westhawk SNMP stack > Subject: Re: [snmp] TrapPduv1.getIpAddress() returns negative values > > > Hi Jordi, > > I've never seen this behaviour before. > > I just run the snmpv1 examples ReceiveTrap (on one machine) & > SendTrap (on the other machine) against each other, using jdk > 1.4 on Linux, successfully. > > run 1: > trap id 1, v SNMPv1 from host 192.67.4.53, sent from port 33504 > > run 2: > raw pdu v SNMPv1 from host 192.67.4.53, sent from port 33504 > > > Which platform do you run the stack? > Which jdk do you use? > > Which IP address are you talking about? > - the TrapPduv1.getIpAddress() > - TrapEvent.getPdu().getContext().getHost() > - something else > What do you use to print the IP address? > > Cheers, Birgit > > > On Sun, Nov 05, 2006 at 07:14:28PM +0100, Jordi Vea wrote: > > Hello, > > > > I'm quite new using the stack (v 5.1), but I have detected a strange > > behaviour with the TrapPduv1. > > I'm receiving traps from a SNMP agent at the IP 192.168.10.60, but > > the stack gets the IP as -64.-88.10.60. ( -64=192-256, -88=168-256 ) > > I sniffed the SNMP PDU using Ethereal, and the Agent > Address was ok, > > so I think this might be a bug from the stack. It has an easy work > > around, but has anyone detected this behaviour before? > > > > Thanks, > > Jordi Vea > > -- > -- Birgit Arkesteijn, birgit@westhawk.co.uk, > -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK > -- tel.: +44 (0)161 237 0660 > -- > _______________________________________________ > snmp mailing list > snmp@snmp.westhawk.co.uk > http://snmp.westhawk.co.uk/mailman/listinfo/snmp > From vea at inicia.es Tue Nov 7 00:19:47 2006 From: vea at inicia.es (Jordi Vea i Barbany) Date: Tue Nov 7 09:44:08 2006 Subject: [snmp] TrapPduv1.getIpAddress() returns negative values In-Reply-To: <000001c701d1$72110860$010010ac@JBERS2> References: <000001c701d1$72110860$010010ac@JBERS2> Message-ID: <454FC313.20902@inicia.es> You are right. The stack wasn't the problem. The thing is that you can't cast byte to int so easily. To represent it as a String I was doing: byte[] addr = trap.getIpAddress(); String agentAddr = addr[0] + "." + addr[1] + "." + addr[2] + "." + addr[3]; Doing the following solves the problem: byte[] addr = trap.getIpAddress(); String agentAddr = ( addr[0] & 0xFF ) + "." + ( addr[1] & 0xFF ) + "." + ( addr[2] & 0xFF ) + "." + ( addr[3] & 0xFF ) ; Thanks a lot. Jordi Vea Josh Bers wrote: >This may be an issues with Java and not with the stack. Since Java assumes >all byte variables represent signed integers if you print them as such they >will appear as negative values, which would explain why you see >-64.-88.10.60. This is in fact the correct IP address (192.168.10.60). So it >sounds like your problem may just be one of representing the ip addresses as >strings. What function are you using to print them out? > >Josh Bers >Mobile Networking Systems >BBN Technologies >jbers@bbn.com >ph. 617.873.4262 >fax. 617.873.4523 >www.bbn.com > > > > >>-----Original Message----- >>From: snmp-bounces@snmp.westhawk.co.uk >>[mailto:snmp-bounces@snmp.westhawk.co.uk] On Behalf Of Birgit >>Arkesteijn >>Sent: Monday, November 06, 2006 8:08 AM >>To: List for discussion of the Westhawk SNMP stack >>Subject: Re: [snmp] TrapPduv1.getIpAddress() returns negative values >> >> >>Hi Jordi, >> >>I've never seen this behaviour before. >> >>I just run the snmpv1 examples ReceiveTrap (on one machine) & >>SendTrap (on the other machine) against each other, using jdk >>1.4 on Linux, successfully. >> >>run 1: >>trap id 1, v SNMPv1 from host 192.67.4.53, sent from port 33504 >> >>run 2: >>raw pdu v SNMPv1 from host 192.67.4.53, sent from port 33504 >> >> >>Which platform do you run the stack? >>Which jdk do you use? >> >>Which IP address are you talking about? >>- the TrapPduv1.getIpAddress() >>- TrapEvent.getPdu().getContext().getHost() >>- something else >>What do you use to print the IP address? >> >>Cheers, Birgit >> >> >>On Sun, Nov 05, 2006 at 07:14:28PM +0100, Jordi Vea wrote: >> >> >>>Hello, >>> >>>I'm quite new using the stack (v 5.1), but I have detected a strange >>>behaviour with the TrapPduv1. >>>I'm receiving traps from a SNMP agent at the IP 192.168.10.60, but >>>the stack gets the IP as -64.-88.10.60. ( -64=192-256, -88=168-256 ) >>>I sniffed the SNMP PDU using Ethereal, and the Agent >>> >>> >>Address was ok, >> >> >>>so I think this might be a bug from the stack. It has an easy work >>>around, but has anyone detected this behaviour before? >>> >>>Thanks, >>>Jordi Vea >>> >>> >>-- >>-- Birgit Arkesteijn, birgit@westhawk.co.uk, >>-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK >>-- tel.: +44 (0)161 237 0660 >>-- >>_______________________________________________ >>snmp mailing list >>snmp@snmp.westhawk.co.uk >>http://snmp.westhawk.co.uk/mailman/listinfo/snmp >> >> >> > > > >_______________________________________________ >snmp mailing list >snmp@snmp.westhawk.co.uk >http://snmp.westhawk.co.uk/mailman/listinfo/snmp > > > From birgit at westhawk.co.uk Tue Nov 7 09:52:35 2006 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Tue Nov 7 09:52:44 2006 Subject: [snmp] TrapPduv1.getIpAddress() returns negative values In-Reply-To: <454FC313.20902@inicia.es> References: <000001c701d1$72110860$010010ac@JBERS2> <454FC313.20902@inicia.es> Message-ID: <20061107095235.GA5450@westhawk.co.uk> Hi Jordi, I realise I missed out the subject line yesterday and only read the message body. Yes, Josh hit the nail on the head. For printing the IP address, why don't you use the JDK, instead of doing it yourself? By using java.net.InetAddress.getByAddress(byte[] addr).getHostName() you'll make sure the code works for IPv4 and IPv6. Cheers, Birgit On Tue, Nov 07, 2006 at 12:19:47AM +0100, Jordi Vea i Barbany wrote: > You are right. The stack wasn't the problem. The thing is that you > can't cast byte to int so easily. > > To represent it as a String I was doing: > > byte[] addr = trap.getIpAddress(); > String agentAddr = addr[0] + "." + addr[1] + "." + addr[2] + "." + > addr[3]; > > Doing the following solves the problem: > > byte[] addr = trap.getIpAddress(); > String agentAddr = ( addr[0] & 0xFF ) + "." + ( addr[1] & 0xFF ) + > "." + ( addr[2] & 0xFF ) + "." + ( addr[3] & 0xFF ) ; > > Thanks a lot. > > Jordi Vea -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- tel.: +44 (0)161 237 0660 -- From vea at inicia.es Tue Nov 7 11:21:27 2006 From: vea at inicia.es (Jordi Vea) Date: Tue Nov 7 10:22:41 2006 Subject: [snmp] TrapPduv1.getIpAddress() returns negative values In-Reply-To: <20061107095235.GA5450@westhawk.co.uk> References: <000001c701d1$72110860$010010ac@JBERS2> <454FC313.20902@inicia.es> <20061107095235.GA5450@westhawk.co.uk> Message-ID: <45505E27.90809@inicia.es> Hi Birgit, You're right. I didn't know this method. Thanks again. Kind regards, Jordi Birgit Arkesteijn escribi?: > Hi Jordi, > > I realise I missed out the subject line yesterday and only read the > message body. Yes, Josh hit the nail on the head. > > For printing the IP address, why don't you use the JDK, instead of doing > it yourself? By using > java.net.InetAddress.getByAddress(byte[] addr).getHostName() > you'll make sure the code works for IPv4 and IPv6. > > Cheers, Birgit > > > On Tue, Nov 07, 2006 at 12:19:47AM +0100, Jordi Vea i Barbany wrote: > >> You are right. The stack wasn't the problem. The thing is that you >> can't cast byte to int so easily. >> >> To represent it as a String I was doing: >> >> byte[] addr = trap.getIpAddress(); >> String agentAddr = addr[0] + "." + addr[1] + "." + addr[2] + "." + >> addr[3]; >> >> Doing the following solves the problem: >> >> byte[] addr = trap.getIpAddress(); >> String agentAddr = ( addr[0] & 0xFF ) + "." + ( addr[1] & 0xFF ) + >> "." + ( addr[2] & 0xFF ) + "." + ( addr[3] & 0xFF ) ; >> >> Thanks a lot. >> >> Jordi Vea >> > > From Gejo.Thayil at aricent.com Wed Nov 15 11:34:30 2006 From: Gejo.Thayil at aricent.com (Gejo.Thayil@aricent.com) Date: Wed Nov 15 09:11:36 2006 Subject: [snmp] wanted Information regarding the PORT from which Inform Response is sendout Message-ID: Hi, I'm using the Westhawk version 4_13 for a simulator to test the SNMP functionalities, however since this stack didn't support Inform Response, so i had to modify this stack a bit so that it sends response to Notifications. now its observed that even if I receive an INFORM notification on port 162 (or any other defined port, that is known to the agent), the stack sends out RESPONSE from any dynamic port(not from port 162/ or the port on which it received the INFORM). I checked it in your latest version 5_1, it also does it in the same way, ie sends the RESPONSE to an INFORM from any dynamic port. This works fine until IPSec is enabled between the SNMP Manager and Agent, It is found that due to the received and sending PORT mismatch the RESPONSE to the INFORM is not reaching the Agent (We are sending the Response to the same port from which INFORM has come), it is seen from ethereal that Westhawk Stack is sending out Responses to the INFORMs. can you guide me what i should do to send the Response from the Received port itself (In case of INFORM) Regards Gejo Joseph Flextronics Software Systems 18/1, Outer Ring Road Panathur Post, Bangalore "I would love to change the world, but no one would give me the source code" *********************** Aricent-Unclassified *********************** "DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus." From birgit at westhawk.co.uk Wed Nov 15 11:50:39 2006 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Wed Nov 15 11:51:04 2006 Subject: [snmp] wanted Information regarding the PORT from which Inform Response is sendout In-Reply-To: References: Message-ID: <20061115115039.GC527@westhawk.co.uk> Hi Gejo, This sounds like an omission on the stack. Currently the stack receives the incoming Inform on a ListeningContext and sends a response on a new SnmpXContext. It should (somehow) go back over the receiving ListeningContext. We would have to look at how to do that best: The ListeningContext will need some send functionality, but to avoid duplicity, the SnmpXContext should still be used to encode the packet but NOT send it. This will take us a couple of days to design, fix and test. Unfortunately, it's not likely to happen soon, unless your company would commission us. Cheers, Birgit ps Love your signature! On Wed, Nov 15, 2006 at 11:34:30AM +0530, Gejo.Thayil@aricent.com wrote: > Hi, > > I'm using the Westhawk version 4_13 for a simulator to test the > SNMP functionalities, however since this stack didn't support Inform > Response, so i had to modify this stack a bit so that it sends response to > Notifications. now its observed that even if I receive an INFORM > notification on port 162 (or any other defined port, that is known to the > agent), the stack sends out RESPONSE from any dynamic port(not from port > 162/ or the port on which it received the INFORM). > > I checked it in your latest version 5_1, it also does it in the same way, > ie sends the RESPONSE to an INFORM from any dynamic port. > > This works fine until IPSec is enabled between the SNMP Manager and Agent, > It is found that due to the received and sending PORT mismatch the > RESPONSE to the INFORM is not reaching the Agent (We are sending the > Response to the same port from which INFORM has come), it is seen from > ethereal that Westhawk Stack is sending out Responses to the INFORMs. > > can you guide me what i should do to send the Response from the Received > port itself (In case of INFORM) > > > > > Regards > > Gejo Joseph > Flextronics Software Systems > 18/1, Outer Ring Road > Panathur Post, Bangalore > > "I would love to change the world, but no one would give me the source > code" -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- tel.: +44 (0)161 237 0660 -- From Gejo.Thayil at aricent.com Wed Nov 15 19:34:25 2006 From: Gejo.Thayil at aricent.com (Gejo.Thayil@aricent.com) Date: Wed Nov 15 14:09:16 2006 Subject: [snmp] wanted Information regarding the PORT from which InformResponseis sendout In-Reply-To: <20061115115039.GC527@westhawk.co.uk> Message-ID: Hi Birjit, Thanks for your Immediate Response to my mail, I was thinking of a simple workaround to this problem and is still trying on it - what I was trying is that to close the socket once we receive an INFORM, then create it to send the RESPONSE so that IPSec now sees the packet coming from the same port (SNMP TRAP Port). - Again close the socket after sending RESPONSE, - DefaultInformContext(DefaultTrapContext) comes to know when socket is closed Now try to create the Socket after a delay. Thread.sleep(An optimum time); (This will takecare of the timegap between receiving and sending packet ) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ with this i could send out a RESPONSE to INFORM (for the first time from Received Port(162)), it again started listening on the same PORT(162) after sleeping for an optimum time received a 2nd INFORM but some socket creation error came before sending RESPONSE (I'm working on this) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ I think if we try this way, the only drawback is it will drop any packet that comes while the stack is processing a RESPONSE to a received INFORM. Now that stack takes a processing time < 300mS (calculated by capturing INFORM and RESPONSE on ethereal) this is not a drawback at all Sadly I'm not an expert on Sockets, so its taking some time for me, will let you know if i can make this work Regards Gejo Joseph Flextronics Software Systems 18/1, Outer Ring Road Panathur Post, Bangalore "I would love to change the world, but no one would give me the source code" Birgit Arkesteijn Sent by: snmp-bounces@snmp.westhawk.co.uk 11/15/2006 05:20 PM Please respond to List for discussion of the Westhawk SNMP stack To List for discussion of the Westhawk SNMP stack cc Subject Re: [snmp] wanted Information regarding the PORT from which InformResponse is sendout Hi Gejo, This sounds like an omission on the stack. Currently the stack receives the incoming Inform on a ListeningContext and sends a response on a new SnmpXContext. It should (somehow) go back over the receiving ListeningContext. We would have to look at how to do that best: The ListeningContext will need some send functionality, but to avoid duplicity, the SnmpXContext should still be used to encode the packet but NOT send it. This will take us a couple of days to design, fix and test. Unfortunately, it's not likely to happen soon, unless your company would commission us. Cheers, Birgit ps Love your signature! On Wed, Nov 15, 2006 at 11:34:30AM +0530, Gejo.Thayil@aricent.com wrote: > Hi, > > I'm using the Westhawk version 4_13 for a simulator to test the > SNMP functionalities, however since this stack didn't support Inform > Response, so i had to modify this stack a bit so that it sends response to > Notifications. now its observed that even if I receive an INFORM > notification on port 162 (or any other defined port, that is known to the > agent), the stack sends out RESPONSE from any dynamic port(not from port > 162/ or the port on which it received the INFORM). > > I checked it in your latest version 5_1, it also does it in the same way, > ie sends the RESPONSE to an INFORM from any dynamic port. > > This works fine until IPSec is enabled between the SNMP Manager and Agent, > It is found that due to the received and sending PORT mismatch the > RESPONSE to the INFORM is not reaching the Agent (We are sending the > Response to the same port from which INFORM has come), it is seen from > ethereal that Westhawk Stack is sending out Responses to the INFORMs. > > can you guide me what i should do to send the Response from the Received > port itself (In case of INFORM) > > > > > Regards > > Gejo Joseph > Flextronics Software Systems > 18/1, Outer Ring Road > Panathur Post, Bangalore > > "I would love to change the world, but no one would give me the source > code" -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- tel.: +44 (0)161 237 0660 -- _______________________________________________ snmp mailing list snmp@snmp.westhawk.co.uk http://snmp.westhawk.co.uk/mailman/listinfo/snmp *********************** Aricent-Unclassified *********************** *********************** Aricent-Unclassified *********************** "DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus." From birgit at westhawk.co.uk Wed Nov 15 14:48:57 2006 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Wed Nov 15 14:49:11 2006 Subject: [snmp] wanted Information regarding the PORT from which InformResponseis sendout In-Reply-To: References: <20061115115039.GC527@westhawk.co.uk> Message-ID: <20061115144857.GE527@westhawk.co.uk> Hi Gejo, I'm not sure I follow what you try to do. The stack gives you no control over the source transport address. Also, I feel you're trying to solve it at a low level. However, if you get it work, good for you! All the best. Cheers, Birgit On Wed, Nov 15, 2006 at 07:34:25PM +0530, Gejo.Thayil@aricent.com wrote: > Hi Birjit, > > Thanks for your Immediate Response to my mail, I was thinking of a > simple workaround to this problem > and is still trying on it > > - what I was trying is that to close the socket once we receive an INFORM, > then create it to send the RESPONSE > so that IPSec now sees the packet coming from the same port (SNMP TRAP > Port). > - Again close the socket after sending RESPONSE, > - DefaultInformContext(DefaultTrapContext) comes to know when socket is > closed > Now try to create the Socket after a delay. Thread.sleep(An optimum > time); > (This will takecare of the timegap between receiving and sending packet > ) > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > with this i could send out a RESPONSE to INFORM (for the first time from > Received Port(162)), > it again started listening on the same PORT(162) after sleeping for an > optimum time > received a 2nd INFORM but some socket creation error came before sending > RESPONSE (I'm working on this) > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > I think if we try this way, the only drawback is it will drop any packet > that comes while the stack is processing a RESPONSE to a received INFORM. > Now that stack takes a processing time < 300mS (calculated by capturing > INFORM and RESPONSE on ethereal) this is not a drawback at all > > > Sadly I'm not an expert on Sockets, so its taking some time for me, will > let you know if i can make this work > > > > Regards > > Gejo Joseph > Flextronics Software Systems > 18/1, Outer Ring Road > Panathur Post, Bangalore > > "I would love to change the world, but no one would give me the source > code" -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- tel.: +44 (0)161 237 0660 -- From Gejo.Thayil at aricent.com Thu Nov 16 15:03:53 2006 From: Gejo.Thayil at aricent.com (Gejo.Thayil@aricent.com) Date: Thu Nov 16 10:04:31 2006 Subject: [snmp] wanted Information regarding the PORT from whichInformResponseis sendout In-Reply-To: <20061115144857.GE527@westhawk.co.uk> Message-ID: Hi Birjit, Thanks for your guidance, I could make this work I was trying all nonsense by creating and deleting sockets a number of times. which i later found to be stupid now that i added a method in DefaultInformContext (to send the Pdu) and then call it from Pdu.sendme( ) (I'm adding a check to ensure only INFORM Response pdu is send through DefaultInformContext) currently Stack uses only the method in Abstract SnmpContext to send packets Now my Stack works fine and the RESPONSE to INFORM is send out from Received Port (162) Regards Gejo Joseph Flextronics Software Systems 18/1, Outer Ring Road Panathur Post, Bangalore "I would love to change the world, but no one would give me the source code" Birgit Arkesteijn Sent by: snmp-bounces@snmp.westhawk.co.uk 11/15/2006 08:18 PM Please respond to List for discussion of the Westhawk SNMP stack To List for discussion of the Westhawk SNMP stack cc Subject Re: [snmp] wanted Information regarding the PORT from whichInformResponseis sendout Hi Gejo, I'm not sure I follow what you try to do. The stack gives you no control over the source transport address. Also, I feel you're trying to solve it at a low level. However, if you get it work, good for you! All the best. Cheers, Birgit On Wed, Nov 15, 2006 at 07:34:25PM +0530, Gejo.Thayil@aricent.com wrote: > Hi Birjit, > > Thanks for your Immediate Response to my mail, I was thinking of a > simple workaround to this problem > and is still trying on it > > - what I was trying is that to close the socket once we receive an INFORM, > then create it to send the RESPONSE > so that IPSec now sees the packet coming from the same port (SNMP TRAP > Port). > - Again close the socket after sending RESPONSE, > - DefaultInformContext(DefaultTrapContext) comes to know when socket is > closed > Now try to create the Socket after a delay. Thread.sleep(An optimum > time); > (This will takecare of the timegap between receiving and sending packet > ) > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > with this i could send out a RESPONSE to INFORM (for the first time from > Received Port(162)), > it again started listening on the same PORT(162) after sleeping for an > optimum time > received a 2nd INFORM but some socket creation error came before sending > RESPONSE (I'm working on this) > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > I think if we try this way, the only drawback is it will drop any packet > that comes while the stack is processing a RESPONSE to a received INFORM. > Now that stack takes a processing time < 300mS (calculated by capturing > INFORM and RESPONSE on ethereal) this is not a drawback at all > > > Sadly I'm not an expert on Sockets, so its taking some time for me, will > let you know if i can make this work > > > > Regards > > Gejo Joseph > Flextronics Software Systems > 18/1, Outer Ring Road > Panathur Post, Bangalore > > "I would love to change the world, but no one would give me the source > code" -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- tel.: +44 (0)161 237 0660 -- _______________________________________________ snmp mailing list snmp@snmp.westhawk.co.uk http://snmp.westhawk.co.uk/mailman/listinfo/snmp *********************** Aricent-Unclassified *********************** "DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."