/* Hey Emacs use -*- mode: C -*- */

/* 
 *------------------------------------------------------------------
 * sockclnt.api - API message(s) to hook up clients, pass traffic
 * to client processes via TCP sockets
 * 
 * Copyright (c) 2009 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *------------------------------------------------------------------
 */

/*
 * Create a socket client registration 
 */
define sockclnt_create {
    u8 name[64];                /* for show, find by name, whatever */
    u32 context;                /* opaque value to be returned in the reply */
};

define sockclnt_create_reply {
    i32 response;               /* Non-negative = success */
    u64 handle;           	/* handle by which vlib knows this client */
    u32 index;                  /* index, used e.g. by API trace replay */
    u32 context;                /* opaque value from the create request */
};

/*
 * Delete a client registration 
 */
define sockclnt_delete {
    u32 index;                  /* index, used e.g. by API trace replay */
    u64 handle;               	/* handle by which vlib knows this client */
};

define sockclnt_delete_reply {
    i32 response;               /* Non-negative = success */
    u64 handle;               	/* in case the client wonders */
};

