Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 Layer3Forwarding and minor enhancements

open
nobody
None
5
2006-06-23
2006-06-23
No

On behalf of inAccessNetworks[1] and for the needs of
the ePerSpace project [2], I've implemented a trivial
implementation of the Layer3Forwarding service.
While working on it I've made some more changes/fixes
included also in the attached patch.

The patch is against a fresh cvs check out and my tree
using diff -wuirN.

I'm sorry for not posting the various changes as
seperate patches but I didn't have the time to post,
defend and maintain my modifications at the time they
were implemented. Please let me know if this is a
problem or if any clarifications/corrections are needed.

Below is a summary of the additional changes (i.e.
apart from the Layer3Forwarding) hoping I don't miss
something:

- fix a bug about PortMappingNumberOfEntries value
being 0 in HandleSubscriptionRequest

- root and embeded devices have now different UDN. I
think this is the right thing. Changes to gatedevice.c
were required (e.g. handling request codes first checks
the UDN and then the ServiceID accordingly).

- Make use of libupnp defined error codes defines whre
possible and add defines for all IGD related error codes

- introduced ActionError function in gatedevice.c to
simplify error situation handling

- introduced a utility function GetNodeTextConditional
for retrieving the text node value if the parent
element node name matches (used fore deviceType and UDN)

- moved UpnpFinish()/exit(0) out of StateTableInit and
into main

- add a presentationURL in the device description
document and an almost empty presentation.html
document. This allow windows My Network Places
generalize control point to display Linux-IGD

---
[1]http://www.inaccessnetworks.com/
[2]http://www.ist-eperspace.org/

Discussion

  • Logged In: YES
    user_id=807622

    Here is an updated patch (linux-igd_l3frwrd_2.diff). It is
    against CVS HEAD of 2006-07-25 and:

    - provides a trivial implementation of missing
    ForceTermination action
    - add a check for valid protocol in AddPortMapping action
    - fix a bug in ActionError (introduced in original patch),
    correctly us vsprintf instead of sprintf

    Please use this patch instead of the original.