openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

phymod_symbols_get.c (636B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  */
      7 
      8 /*******************************************************************************
      9  *
     10  * PHYMOD Symbol Routines
     11  */
     12 
     13 #include <phymod/phymod_symbols.h>
     14 
     15 int 
     16 phymod_symbols_get(const phymod_symbols_t* symbols, uint32_t sindex, phymod_symbol_t* rsym)
     17 {
     18     if (symbols) {
     19 	if (sindex < symbols->size) {
     20 	    /* Index is within the symbol table */
     21 	    *rsym = symbols->symbols[sindex]; 
     22 	    return 0;
     23 	}
     24     }
     25     return -1; 
     26 }
     27