locked
PNRP, Link_Local cloud only RRS feed

  • Question

  • Hi,
          Im trying to modify the Graph Chat sample to run on the link_local cloud only, I have changed the scope id, set PEER_GRAPH_SCOPE_LINKLOCAL and  all the bits needed to make it run on the link_local, but im having problems with pnrp failing to register or resolve.

    here is the input to the toPnrpRegister:

    Code Snippet

    PnrpRegister(g_pwzIdentity, pwzUnsecuredName, "LinkLocal_2002:88ce:18a8:a::/64", pNodeInfo);


    As you can see im hard coding the cloud name into the application, this is just temporary, i go it from manually looking up the name with "netsh p2p pnrp cloud show list" on the command line.

    I also get an error when using the PnrpResolve method.

    Is it actually possible to make an application that just uses the link_local cloud and not contact the global cloud at all?

    Im currently creating a lan file sharing application and want to use the graphing api and pnrp to auto discover clients on the same lan, is this actually possible?


    btw, im using windows xp sp2.

    Thanks for any advice,
                                     Joe
    Monday, February 18, 2008 4:04 PM

All replies

  •  

    Hi Joe,

    I think you are using XPSP2 with PNRPv2 update. Let me know if my assumption is not correct.

    You can be able to use all Link local clouds in the system using the Clous name as "PEER_PNRP_ALL_LINK_CLOUDS". 

    You need to be carefule about the cloud connectivity. If you have a machine with Wire and Wireless connection, in that case you will have two Link local clouds, but those two cloud may not able to talk to each other.

     

    You should not have any difficulties in resolving the name in LL. Check the status of the LL cloud which needs to be Active in case you are resolving a name which was published from another machine.

    Please let me know if you need more information.

    Thanks,

    Pritam

     

     

     

    Monday, February 18, 2008 7:21 PM
  • yeh, im using XPSP2 with PNRPv2. so to register a node in pnrp I should use:

    Code Snippet

    PnrpRegister(g_pwzIdentity, pwzUnsecuredName, PEER_PNRP_ALL_LINK_CLOUDS, pNodeInfo);


    is this correct?

    im getting errors saying that registration failed.

    I want to be able to register and resolve pnrp names in the link local cloud only, i dont want to use the global cloud.

    thanks for your help so far,

    Joe
    Thursday, February 21, 2008 2:21 PM
  • Hi Joe,

    Can you please let me know the return error code for registration?

    Thanks,

    Pritam

     

     

     

    Friday, February 22, 2008 2:23 AM
  • Hi,
    Ive broken the program into smaller parts and discovered that Im having problems creating graphs in the link local cloud

    I have called the peergraph and WSA startup methods before using this:

    heres my code for creating a graph:

    Code Snippet

    HRESULT CreateGraph(PWSTR wzCreatorId, PWSTR wzGraphId)
    {
        HRESULT hr = S_OK;
        PEER_GRAPH_PROPERTIES props = {0};

        props.dwSize = sizeof(props);
        props.pwzFriendlyName = L"Sample Graph";
        props.pwzGraphId = wzGraphId;
        props.pwzCreatorId = wzCreatorId;
        props.cPresenceMax = -1;    // publish presence for everyone.
        props.dwScope = PEER_GRAPH_SCOPE_LINKLOCAL;

        hr = PeerGraphCreate(&props, L"SampleChatGraph", NULL, &g_hGraph);

        if (SUCCEEDED(hr))
        {
            cout << "New graph created" << endl;
        }
        else
        {
            cout << "Failed to create a new Graph";
        }

        return hr;
    }


    This code does not create a graph and prints out the fail message.

    Is it possible to create graphs and register in pnrp while only using the link local cloud, or is this unfinished by microsoft?
    Im finding this very frustrating....

    thanks your help,

    Joe


    Friday, February 29, 2008 2:15 AM
  • Hey,
    Got it all the pnrp stuff figured out now,

    thanks for all the help,
    Joe
    Wednesday, March 5, 2008 11:09 PM
  • Hi all!

    a small question:
    where PEER_PNRP_ALL_LINK_CLOUDS is defined?

    I am using WinXP, SP3.

    Actually I have both wire and wireless connections and i would like to know if there is a way to have connectivity with all possible setups. eg

    ComputerA: Wire
    ComputerB: Wire & Wireless
    ComputerC: Wireless

    is it possible to have a graph with all these computers available?




    Friday, September 19, 2008 4:43 PM
  • Joe,

    Is it possible for you to upload your code with link local instead of global?  I'm going through the same steps you are and would really save some headache.  If you'd like you can e-mail me: klh at iti-global.com.

    Thanks,

    Kris
    Wednesday, December 2, 2009 6:22 PM