Menu

#13 Gateway static prefixes

open
None
5
2001-06-22
2001-01-24
No

Whenever a RRQ (keepAlive = FALSE) message is received from a gateway, a new endpoint is inserted in the EPTable (member variable of Environ) in file RasServer.cxx. Hence, a control is done to check whether the gateway is associated to static prefixes, or not. If it is, its type is changed in the proper way. However, the gateway EP has already been inserted in the EPTable, so that this type change has no effect in the database. I solved this problem by first checking for static prefixes (and eventually modifying the gateway type record) and then inserting it into the EPTable

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Hi Emiliano,
    I am trying to use prefixes feature of gatekeeper, but it
    seems like not work. I already added some item into
    registration based on the description of readme file. Would
    you like to tell me how you made this feature work?

    Thanks in advance,
    Tony

     
  • Emiliano Bacci

    Emiliano Bacci - 2001-06-22
    • assigned_to: nobody --> aunitt
     
  • Emiliano Bacci

    Emiliano Bacci - 2001-06-22

    Logged In: YES
    user_id=141278

    Here I reported the old code lines in the final part of the EndpointTable::Insert() function, located in file
    EndpointTabl.cxx.

    TableMutex.Wait();
    Table.insert( EP );
    InsertAliases( AliasMap, Aliases, EP.GetId() );
    if ( EP.IsInLocalZone() && EP.IsGateway() )
    {
    // Add any additional static prefixes
    PIPSocket::Address Addr;
    WORD Port;
    H225_EndpointType Type = EP.GetType();

        AddrUtils::ConvertToIPAddress\( RegAddr, Addr, Port \);
        MyEnviron.AddStaticPrefixes\( Type.m\_gateway, Addr \);
        EP.SetType\( Type \);
    
        // Add to the list of gateways
        Gateways.Append\( EP.GetId\(\).Clone\(\) \);
    \}
    TTL.Append\( TimeToLive \);
    TableMutex.Signal\(\);
    

    }

    Now I reported the code as I modified it:

    InsertAliases( AliasMap, Aliases, EP.GetId() );
    if ( EP.IsInLocalZone() && EP.IsGateway() )
    {
    // Add any additional static prefixes
    PIPSocket::Address Addr;
    WORD Port;
    H225_EndpointType Type = EP.GetType();

        AddrUtils::ConvertToIPAddress\( RegAddr, Addr, Port \);
        MyEnviron.AddStaticPrefixes\( Type.m\_gateway, Addr \);
        EP.SetType\( Type \);
    
        // Add to the list of gateways
        Gateways.Append\( EP.GetId\(\).Clone\(\) \);
    \}
    TableMutex.Wait\(\);
    Table.insert\( EP \);
    TTL.Append\( TimeToLive \);
    TableMutex.Signal\(\);
    

    }

     

Log in to post a comment.