I was going to do a quick test of opaque data in the registration, but I
don't see a way to do that via slp.reg.  slpd_regfile.c doesn't seem to look
for 0xff and then interpret the next two bytes as HEXDIG.

On the other hand, if the intent was just multiple values for that attribute
this is a moot point.

--Nick

On Tue, Sep 20, 2011 at 8:25 AM, Nick Wagner <ne...@wingedbeast.org> wrote:

> Unless I was misreading the email and you are saying the values were
> intended to be a single opaque value for that attribute?
>
> --Nick
>
>
> On Mon, Sep 19, 2011 at 1:50 PM, Nick Wagner <ne...@wingedbeast.org>wrote:
>
>> Agreed.  If you look at the ABNF in section 5, attr-val-list uses
>> unescaped commas to separate the attribute values.
>>
>> --Nick
>>
>>
>> On Mon, Sep 19, 2011 at 12:50 PM, Roel van de Kraats <rkra...@dds.nl>wrote:
>>
>>>
>>>
>>> On 09/19/2011 06:24 PM, Jim Marshall wrote:
>>> > John Calcote wrote:
>>> >> I wasn't aware of it Jim - looks like you found a bug. Should be
>>> pretty easy
>>> >> to fix, though.
>>> > It appears that the OpenSLP C code is not escaping the characters:
>>> >
>>> > [bin]$ ./slptool register service:foo:http://192.168.5.113:2268
>>> > "(attribute=one,two,three)"
>>> >
>>> > Raw dump from WireShark:
>>> >
>>> > ....r@
>>> ........en....%service:foo:http://192.168.5.113:2268...service:foo:http..default..
>>> (attribute=one,two,three)...............en..
>>> >
>>> > Also if I modify the Java API to not do any escaping, my test program
>>> > (and the register example) register properly.
>>> >
>>> > Is it possible that OpenSLP is not escaping/unescpaing the characters
>>> > per the RFC?
>>> The way I understand section 6.4 of
>>> http://www.openslp.org/doc/rfc/rfc2608.txt is that commas only need to
>>> be escaped when they are part of the data strings, not when they are
>>> used as delimiter.
>>>
>>> If so, the java implementation should be modified not to escape the
>>> delimiters.
>>>
>>> BR,
>>>     Roel
>>> >
>>> > Thanks
>>> >> -----Original Message-----
>>> >> From: Jim Marshall [mailto:jim.marsh...@wbemsolutions.com]
>>> >> Sent: Friday, September 16, 2011 12:42 PM
>>> >> To: openslp-users@lists.sourceforge.net
>>> >> Subject: [Openslp-users] Attribute values with comma's treated
>>> differently
>>> >> between Java and C
>>> >>
>>> >>
>>> >>         Message body
>>> >>
>>> >> Hi,
>>> >> I was doing some testing with SLP (java API 1.0, SLP 1.2.1). I wrote a
>>> >> fairly simple program which registers a dummy service with one
>>> >> attribute, this attribute is a comma delineated string.
>>> >>
>>> >> When I use slptool (or a C program) to register it works as expected:
>>> >>
>>> >> $ slptool.bat register service:foo:http://192.168.5.113:2268
>>> >> "(Attribute=one,two,three)"
>>> >> $ slptool findattrs service:foo:http://192.168.5.113:2268
>>> >> (Attribute=one,two,three)
>>> >>
>>> >> Now doing the same thing with the Java API results in the following:
>>> >>
>>> >> $ slptool findattrs service:foo:http://192.168.5.113:2268
>>> >> (Atrribute=one\2ctwo\2cthree)
>>> >>
>>> >> Notice the ',' have been converted to '\2c'. The issue can be
>>> duplicated
>>> >> with the "Register" Java example.
>>> >>
>>> >> What I believe is happening is that the Java API is calling
>>> >> ServiceLocationAttribute.escapeString before sending the data over the
>>> >> wire (RFC 2165 section 17.1.1) but the server is not un-escaping it
>>> >> and/or the client is also not un-escaping the value. The  resulting
>>> >> registration is not valid for clients that need to examine the
>>> attributes.
>>> >>
>>> >> Is this a known issue? Is there a work-around?
>>> >>
>>> >> Thank you
>>> >>
>>> >> C:\test>java -classpath ".;slp.jar;log4j.jar"
>>> >> com.solers.slp.test.Register service:foo:http://192.168.5.113:2268
>>> >> one,two,three
>>> >> Sep 16, 2011 2:34:41 PM com.solers.slp.ServiceLocationEnumerationImpl
>>> >> transmitDatagram
>>> >> INFO: Sending: ServiceRequest: Type: service:directory-agent Filter:
>>> >> Sep 16, 2011 2:34:44 PM com.solers.slp.ServiceLocationEnumerationImpl
>>> >> transmitDatagram
>>> >> INFO: Sending: ServiceRequest: Type: service:directory-agent Filter:
>>> >> Sep 16, 2011 2:34:47 PM com.solers.slp.ServiceLocationEnumerationImpl
>>> >> transmitDatagram
>>> >> INFO: Sending: ServiceRequest: Type: service:directory-agent Filter:
>>> >> Sep 16, 2011 2:34:47 PM com.solers.slp.NetworkManager saMessage
>>> >> INFO: Sending: ServiceRegistration: URL:
>>> >> service:foo:http://192.168.5.113:2268 Attributes:
>>> >> Attribute1=(java.lang.String)one\2ctwo\2cthree
>>> >> Sep 16, 2011 2:34:47 PM com.solers.slp.NetworkManager saMessage
>>> >> INFO: Sent registration to slpd.
>>> >>
>>> >> C:\tests>slptool findattrs service:foo:http://192.168.5.113:2268
>>> >> (Attribute1=one\2ctwo\2cthree)
>>> >>
>>> >>
>>> >>
>>> ----------------------------------------------------------------------------
>>> >> --
>>> >> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>>> >> http://p.sf.net/sfu/rim-devcon-copy2
>>> >> _______________________________________________
>>> >> Openslp-users mailing list
>>> >> Openslp-users@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/openslp-users
>>> >>
>>> >>
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>>> > Learn about the latest advances in developing for the
>>> > BlackBerry&reg; mobile platform with sessions, labs&  more.
>>> > See new tools and technologies. Register for BlackBerry&reg; DevCon
>>> today!
>>> > http://p.sf.net/sfu/rim-devcon-copy1
>>> > _______________________________________________
>>> > Openslp-users mailing list
>>> > Openslp-users@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/openslp-users
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> All the data continuously generated in your IT infrastructure contains a
>>> definitive record of customers, application performance, security
>>> threats, fraudulent activity and more. Splunk takes this data and makes
>>> sense of it. Business sense. IT sense. Common sense.
>>> http://p.sf.net/sfu/splunk-d2dcopy1
>>> _______________________________________________
>>> Openslp-users mailing list
>>> Openslp-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/openslp-users
>>>
>>
>>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Openslp-users mailing list
Openslp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-users

Reply via email to