예제 #1
0
static void
_cmd_Version(_MetisCommandLineInterface_Session *session, _MetisCommandLineInterface_Command *command, const char *params)
{
    PARCJSON *versionJson = metisConfiguration_GetVersion(metisForwarder_GetConfiguration(session->parentCli->metis));
    char *str = parcJSON_ToString(versionJson);
    parcEventQueue_Printf(session->streamBuffer, "%s", str);
    parcMemory_Deallocate((void **) &str);
    parcJSON_Release(&versionJson);
}
예제 #2
0
static CCNxControl *
metisConfiguration_ProcessForwarderVersion(MetisConfiguration *config, CCNxControl *request, unsigned ingressId)
{
    PARCJSON *fwd = metisConfiguration_GetVersion(config);

    // this process of getting to a MetisMesage needs streamlining

    CCNxControl *response = cpi_CreateResponse(request, fwd);
    return response;
}