/*
 * Ouroboros - Copyright (C) 2016
 *
 * IRM messages
 *
 *    Sander Vrijders <sander.vrijders@intec.ugent.be>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

import "dif_config.proto";

enum irm_msg_code {
        IRM_CREATE_IPCP       =  1;
        IPCP_CREATE_R         =  2;
        IRM_DESTROY_IPCP      =  3;
        IRM_LIST_IPCPS        =  4;
        IRM_BOOTSTRAP_IPCP    =  5;
        IRM_ENROLL_IPCP       =  6;
        IRM_BIND_AP           =  7;
        IRM_UNBIND_AP         =  8;
        IRM_API_ANNOUNCE      =  9;
        IRM_BIND_API          = 10;
        IRM_UNBIND_API        = 11;
        IRM_REG               = 12;
        IRM_UNREG             = 13;
        IRM_FLOW_ACCEPT       = 14;
        IRM_FLOW_ALLOC_RESP   = 15;
        IRM_FLOW_ALLOC        = 16;
        IRM_FLOW_ALLOC_RES    = 17;
        IRM_FLOW_DEALLOC      = 18;
        IPCP_FLOW_REQ_ARR     = 19;
        IPCP_FLOW_ALLOC_REPLY = 20;
        IRM_REPLY             = 21;
};

message irm_msg {
        required irm_msg_code code   =  1;
        optional string ap_name      =  2;
        optional string ae_name      =  3;
        optional sint32 api          =  4;
        optional uint32 ipcp_type    =  5;
        repeated string dif_name     =  6;
        repeated string args         =  7;
        optional sint32 response     =  8;
        optional string dst_name     =  9;
        optional sint32 port_id      = 10;
        optional dif_config_msg conf = 11;
        optional uint32 opts         = 12;
        repeated sint32 apis         = 13;
        optional sint32 result       = 14;
};