OVERVIEW   INDEX   DEPRECATED   HELP   CORRESPONDENCES  


Module Parameters   Data Types   Component Types   Port Types   Constants   Templates   Signatures   Functions   Altsteps   Test Cases  

Module STUN_Templates


Import Declarations:


Constants Summary
c_STUN_Initial_Msg
c_STUN_Keep_Alive_Msg
Templates Summary
cs_bindingRequest
cr_bindingRequest
cs_bindingResponse
cr_bindingResponse
cs_xorMappedAddress
cs_MappedAddress
cr_xorMappedAddress

Details

c_STUN_Initial_Msg
const charstring c_STUN_Initial_Msg := "Wait Initial STUN messages"

c_STUN_Keep_Alive_Msg
const charstring c_STUN_Keep_Alive_Msg := "Wait Keep Alive STUN messages"

cs_bindingRequest
template (value) STUNMessage cs_bindingRequest(
template (value) integer p_transId := float2int(rnd())
) := {
header := {
messageType := request,
messageLength := 0,
magicCookie := MAGIC_COOKIE,
transactionID := p_transId
},
messageAttributes := omit
}

Returns: STUNMessage -

Parameters:
cr_bindingRequest
template (present) STUNMessage cr_bindingRequest := {
header := {
messageType := request,
messageLength := ?,
magicCookie := MAGIC_COOKIE,
transactionID := ?
},
messageAttributes := *
}

cs_bindingResponse
template (value) STUNMessage cs_bindingResponse(
template (value) integer p_transId,
template (omit) STUNMessageAttributGroup p_attributes
) := {
header := {
messageType := success_response,
messageLength := 0, 
magicCookie := MAGIC_COOKIE,
transactionID := p_transId
},
messageAttributes := p_attributes
}

Returns: STUNMessage -

Parameters:
cr_bindingResponse
template (present) STUNMessage cr_bindingResponse(
template (present) integer p_transId := ?,
template (present) STUNMessageAttributGroup p_attributes := ?
) := {
header := {
messageType := success_response,
messageLength := ?,
magicCookie := MAGIC_COOKIE,
transactionID := p_transId
},
messageAttributes := p_attributes
}

Returns: STUNMessage -

Parameters:
cs_xorMappedAddress
template(value) STUNMessageAttributGroup cs_xorMappedAddress(
template (value) integer p_xPort,
template (value) octetstring p_xAddress
) := {
{
xorMappedAddress := {
stunType := XOR_MAPPED_ADDRESS,
stunLength := 0, 
family := IPv4,
xPort := p_xPort,
xAddress := p_xAddress
}
}
}

Returns: STUNMessageAttributGroup -

Parameters:
cs_MappedAddress
template(value) STUNMessageAttributGroup cs_MappedAddress() := {
    {
        mappedAdress := {
            stunType := MAPPED_ADDRESS,
            stunLength := 0,  
            family := ics_stun_ip_family,
            mappedAddressPort := ics_stun_server_port,
            mappedAdressAddress := f_Convert_IPv4Addr2OctString(ics_stun_server_ip)
        }
    }
}

Returns: STUNMessageAttributGroup -

cr_xorMappedAddress
template STUNMessageAttributGroup cr_xorMappedAddress := {
*,
{
xorMappedAddress := ?
},
*
}