/* * Copyright (c) 2011-2015, Emulex * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * */ #if !defined(__ELXU_LANCER_H__) #define __ELXU_LANCER_H__ #include typedef struct sli4_object_s { struct sli4_object_s *next; char *name; uint32_t type; uint32_t length; } sli4_object_t; extern sli4_object_t *sli4_object_new(const char *name, uint32_t type, uint32_t length); extern void sli4_object_free(sli4_object_t *obj); extern void sli4_object_free_list(sli4_object_t *head); extern sli4_object_t *sli4_object_enumerate(elxu_device_t *device); extern int sli4_object_delete (elxu_device_t *device, const char *objectName); extern int sli4_object_read(elxu_device_t *device, const char *objectName, void *buffer, uint32_t bufferLength); extern int sli4_object_write (elxu_device_t *device, const char *objectName, int buffer_offset, void *buffer, uint32_t bufferLength, int eofl); extern int sli4_object_length(elxu_device_t *device, const char *objectName); #endif // __ELXU_LANCER_H__