On Fri, 11 Aug 2000, Jean Tourrilhes wrote:
> Scott Dattalo wrote :
> > That's what I get when I do this:
> >
> > setsockopt(fd, SOL_IRLMP, IRLMP_IAS_SET,
> > (const char *) pIASSet_Name,
> > IASSet_Name_Len)
> >
> > Is it possible to set the IAS services with a setsockopt call? If this is not
> > the way to do it, can someone point me to an example that illustrates how?
> >
> > What I'm trying to do: I'm working on a simple IrDA server program that talks to
> > a Palm Pilot client. I have a similar working program that runs under windows
> > (w2k) and I'd like it to work under Linux as well. The client is looking for a
> > specific service that the server is supposed to supply.
>
> First of all, if you are using an IrDA stack without my
> patches, you are asking for trouble. The latest official stack from
I failed to mention, my kernel version is 2.2.16 - which certainly don't have
your patches.
> Dag contains the preliminary support for IRLMP_IAS_SET that I wrote,
> but you *really* need my patch you you want to avoid troubles.
> My patch my be found there :
> http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/Java.html
> More recent versions for 2.4 :
> http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrNET.html
> Dag told me that he was planning to integrate those patches in
> the official IrDA stack, so maybe he can give you more info on the
> subject.
I'll grab them and try it out
<snip>
>
> I looked at your code, and honestly it gives me headackes
> because it's to ugly. You are playing with arrays and pointers in
> weirds ways instead of getting things straight. I mean, compare your
> code and mine !
;). At least I can say I didn't write it! This is from an application that was
written for W2K that I'm trying to port to Linux. As you can see, it has the
typical windows paradigm of creating a type cast for every conceivable thing. I
suppose if you were constantly immersed in it then the style would make
sense. Unfortunately (actually fortunately), I seldom do windows... so this code
is hard for me to read as well.
> Anyway, your error is trivial. The error is returned by the
> following line in net/irda/af_irda.c (line 1761 in my source) :
> -----------------------
> if (optlen != sizeof(struct irda_ias_set))
> return -EINVAL;
> -----------------------
line 1618 - you must have quite a few patches.
> By the way, I'm curious at what you are doing. I originally
> implemente IAS support for something very similar.
> Have fun, and good luck in debugging...
Well, there's a device that I'm trying to communicate with that will only accept
a connection if there's a certain type of service available. This is a
proprietary device and I'm trying to emulate it's behavior with a server program
running under Linux. Like I said before, I have access to a similar program for
W2K. However, I have found debugging and developing IrDA stuff much easier under
Linux. For example, having access to the source has been invaluable.
Furthermore, the irdadump has point out errors that would have been nearly
impossible to find otherwise.
Thanks for the help,
Scott
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda