Blame opamgt/include/public/opamgt_sa_notice.h

Packit Service 3470d1
/* BEGIN_ICS_COPYRIGHT2 ****************************************
Packit Service 3470d1
Packit Service 3470d1
Copyright (c) 2015-2017, Intel Corporation
Packit Service 3470d1
Packit Service 3470d1
Redistribution and use in source and binary forms, with or without
Packit Service 3470d1
modification, are permitted provided that the following conditions are met:
Packit Service 3470d1
Packit Service 3470d1
    * Redistributions of source code must retain the above copyright notice,
Packit Service 3470d1
      this list of conditions and the following disclaimer.
Packit Service 3470d1
    * Redistributions in binary form must reproduce the above copyright
Packit Service 3470d1
      notice, this list of conditions and the following disclaimer in the
Packit Service 3470d1
      documentation and/or other materials provided with the distribution.
Packit Service 3470d1
    * Neither the name of Intel Corporation nor the names of its contributors
Packit Service 3470d1
      may be used to endorse or promote products derived from this software
Packit Service 3470d1
      without specific prior written permission.
Packit Service 3470d1
Packit Service 3470d1
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Packit Service 3470d1
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit Service 3470d1
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Packit Service 3470d1
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
Packit Service 3470d1
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit Service 3470d1
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Packit Service 3470d1
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Packit Service 3470d1
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Packit Service 3470d1
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit Service 3470d1
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit Service 3470d1
Packit Service 3470d1
** END_ICS_COPYRIGHT2   ****************************************/
Packit Service 3470d1
Packit Service 3470d1
/* [ICS VERSION STRING: unknown] */
Packit Service 3470d1
Packit Service 3470d1
#ifndef __OPAMGT_NOTICE_H__
Packit Service 3470d1
#define __OPAMGT_NOTICE_H__
Packit Service 3470d1
Packit Service 3470d1
#ifdef __cplusplus
Packit Service 3470d1
extern "C" {
Packit Service 3470d1
#endif
Packit Service 3470d1
Packit Service 3470d1
#include <opamgt.h>
Packit Service 3470d1
#include <opamgt_sa.h>
Packit Service 3470d1
Packit Service 3470d1
/**
Packit Service 3470d1
 * @brief Initiates a registration for the specified trap.
Packit Service 3470d1
 *
Packit Service 3470d1
 * @param port      Previously initialized port object for an in-band
Packit Service 3470d1
 *  				connection.
Packit Service 3470d1
 * @param trap_num  Trap Number to resgister for.
Packit Service 3470d1
 * @param context   optional opaque info to be retruned when trap is recieved.
Packit Service 3470d1
 *
Packit Service 3470d1
 * @return OMGT_STATUS_T
Packit Service 3470d1
 */
Packit Service 3470d1
OMGT_STATUS_T omgt_sa_register_trap(struct omgt_port *port, uint16_t trap_num,
Packit Service 3470d1
	void *context);
Packit Service 3470d1
Packit Service 3470d1
/**
Packit Service 3470d1
 * @brief Unregisters for the specified trap.
Packit Service 3470d1
 *
Packit Service 3470d1
 * @param port      Previously initialized port object for an in-band
Packit Service 3470d1
 *  				connection.
Packit Service 3470d1
 * @param trap_num  Trap Number to unresgister.
Packit Service 3470d1
 *
Packit Service 3470d1
 * @return OMGT_STATUS_T
Packit Service 3470d1
 */
Packit Service 3470d1
OMGT_STATUS_T omgt_sa_unregister_trap(struct omgt_port *port, uint16_t trap_num);
Packit Service 3470d1
Packit Service 3470d1
/**
Packit Service 3470d1
 * @brief Gets the Notice Report forwarded from the SM
Packit Service 3470d1
 *
Packit Service 3470d1
 * @param port             Previously initialized port object for an in-band
Packit Service 3470d1
 *  					   connection.
Packit Service 3470d1
 * @param notice           Pointer to Notice structure that is allocate and
Packit Service 3470d1
 *  					   returned. Must be freed by user.
Packit Service 3470d1
 * @param notice_len       pointer to length of Notice structure to be returned.
Packit Service 3470d1
 *  					   Length should always be greater than or equal to the
Packit Service 3470d1
 *  					   sizeof(STL_NOTICE). All bytes that exist greather
Packit Service 3470d1
 *  					   than sizeof(STL_NOTICE) are for ClassData (i.e.
Packit Service 3470d1
 *  					   ClassData Length = notice_len - sizeof(STL_NOTICE)).
Packit Service 3470d1
 * @param context          pointer to registration context value returned.
Packit Service 3470d1
 * @param poll_timeout_ms  Length of time this function will poll (wait) for a
Packit Service 3470d1
 *  					   Notice Report to be received in milliseconds (-1 will
Packit Service 3470d1
 *  					   block indefinitely, 0 will not block, and X > 0 will
Packit Service 3470d1
 *  					   block for X).
Packit Service 3470d1
 *
Packit Service 3470d1
 * @return OMGT_STATUS_T
Packit Service 3470d1
 */
Packit Service 3470d1
OMGT_STATUS_T omgt_sa_get_notice_report(struct omgt_port *port, STL_NOTICE **notice,
Packit Service 3470d1
	size_t *notice_len, void **context, int poll_timeout_ms);
Packit Service 3470d1
Packit Service 3470d1
#ifdef __cplusplus
Packit Service 3470d1
}
Packit Service 3470d1
#endif
Packit Service 3470d1
#endif /* __OPAMGT_NOTICE_H__ */