CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Location
    New York City
    Posts
    9

    Discovery Phase of UPnP Architecture using SSDP on C or C++ lanuage on eVC4.0 OS

    Hi All,
    Good Evening! How are you?
    I am facing with one problem. How to implement the SSDP (only discovery phase, not all) of UPnP architecture using C/C++ on eVC 4.0 environment?

    i'll write the description below.

    SSDP Discovery Program


    Target OS: Windows XP
    Development Language: Microsoft Visual C++ 6.0

    Development Guidelines: Code to be will documented and built-in modules using C/C++. Code will be expanded to support other UpnP functionality and output initially will be textual, but will integrate into the GUI built for the rest of the product, also written in C/C++. Look and feel is not important, as the output at this stage is a test program. All proper error return codes and error handling is expected. Follow on to support control of Internet Gateway Device(s) (IGD) is planned.

    Description: Program to display a list of all discovered SSDP UPnP devices. A simple menu with options to initiate discovery, filter and search by device and/or service type and only show root devices. Bare in mind we will want to show all of the discovered device’s or service’s attributes at some point.


    Description:
    The following is an overview of the messages used to implement SSDP.

    SSDP clients discover SSDP services using the reserved local
    administrative scope multicast address 239.255.255.250 over the SSDP port
    (1900/UDP).

    UPnP and SSDP listen on port 5000 for TCP connections and UDP port 1900 for
    incoming datagram packets. Since these are not commonly used ports, most
    personal firewalls and firewall appliances will block connections to these
    ports.

    For brevity's sake the SSDP reserved local administrative scope
    multicast address and port will be referred to as the SSDP multicast
    channel/Port.

    Discovery occurs when a SSDP client multicasts a HTTP UDP discovery
    request to the SSDP multicast channel/Port. SSDP services listen to the SSDP
    multicast channel/Port in order to hear such discovery
    requests. If a SSDP service hears a HTTP UDP discovery request that
    matches the service it offers then it will respond using a unicast
    HTTP UDP response.

    SSDP services may send HTTP UDP notification announcements to the
    SSDP multicast channel/port to announce their presence.

    Hence two types of SSDP requests will be sent across the SSDP
    multicast channel/port. The first are discovery requests, a SSDP
    client looking for SSDP services. The second are presence
    announcements, a SSDP service announcing its presence.

    ssdp:alive -- SSDP services may declare their presence on the network by
    sending a [GENA] NOTIFY method using the NTS value ssdp:alive to the SSDP
    multicast channel/port.

    For brevity's sake HTTP NOTIFY methods with the NTS value ssdp:alive
    will be referred to as ssdp:alive requests.

    When a ssdp:alive request is received whose USN matches the USN of
    an entry already in the SSDP client's cache then all information
    regarding that USN is to be replaced with the information on the
    ssdp:alive request. Hence ssdp:alive requests can be used to update
    location information and prevent cache entries from expiring.

    ssdp:byebye -- SDP services may declare their intention to cease operating
    by sending a [GENA] NOTIFY method using the NTS value ssdp:byebye to the
    SSDP multicast channel/port.

    Since 1 week i am facing so many problems with this problem. Could you please let me know how to implement this, and how to start? I would really appreciate your feedback on this.
    Thanks
    Ravi.
    Ravi Billakanti
    New York
    203-530-7200 (M)

  2. #2
    Join Date
    Sep 2002
    Posts
    1,747
    Well, you have a pretty good objective defined and some of the basics outlined that you will need. That is where you should start, so that is good. However, you then state
    Originally posted by Ravi149
    Since 1 week i am facing so many problems with this problem. Could you please let me know how to implement this, and how to start?
    Unfortunately, this doesn't tell us much to help you out. If you tell us which problems exactly you are having, we could help better. Here are some of my questions, to help you in your next post:
    • Are you using a socketing library, WinSock(2), or lower level stuff?
    • Do you know how to send the UDP packet by multicast?
    • Do you know how it is formatted?
    • Have you got the HTTP response properly received?
    • What errors are you getting?
    */*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/

    "It's hard to believe in something you don't understand." -- the sidhi X-files episode

    galathaea: prankster, fablist, magician, liar

  3. #3
    Join Date
    Dec 2002
    Posts
    287
    I agree with galathaea: if you have a specific problem that needs to be solved, this is the right place to ask for help.
    But don't expect anyone to start doing your work based on the posted specs. This is your job and most probably you are getting paid for doing it...

    Dan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured