X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fftacmp%2Fnic_def.cc;h=a06a2e6ed9c4661ab957f90d4f7c7ff07f3bb5bb;hb=07495effe193ca3f73c3bf0ce417068f9ac9dcdd;hp=e613c3ab2b75c2e766a1d431dd3ae550ba677bd2;hpb=93d248304a68de7a8f9daf4aa74f9ee4cd27410c;p=com%2Fgs-lite.git diff --git a/src/ftacmp/nic_def.cc b/src/ftacmp/nic_def.cc index e613c3a..a06a2e6 100644 --- a/src/ftacmp/nic_def.cc +++ b/src/ftacmp/nic_def.cc @@ -1,128 +1,128 @@ -/* ------------------------------------------------ -Copyright 2014 AT&T Intellectual Property - 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. - ------------------------------------------- */ -#include -#include - -#include"nic_def.h" - -extern int NicParserparse(void); -extern FILE *NicParserin; -extern int NicParserdebug; - - -nic_property *nicp; -std::vector nic_attr_vec; -std::vector nic_val_vec; -std::string nic_a, nic_v; - -using namespace std; - -nic_property *load_nic_property(std::string dir, std::string name){ - - string fname; - if(dir != "") - fname = dir + "/nic_property_"+name+".def"; - else - fname = "nic_property_"+name+".def"; - - FILE *nicf = fopen(fname.c_str(),"r"); - if(! nicf){ - fprintf(stderr,"ERROR, can't open nic property file %s\n",fname.c_str()); - return NULL; - } - -NicParserdebug = 0; - nicp = new nic_property(); - NicParser_setfileinput(nicf); - if(NicParserparse()){ - fprintf(stderr,"could not parse nic property file %s\n",fname.c_str()); - return NULL; - } - - return nicp; -} - -bool nic_property::legal_type(string t){ -int i; - for(i=0;i +#include + +#include"nic_def.h" + +extern int NicParserparse(void); +extern FILE *NicParserin; +extern int NicParserdebug; + + +nic_property *nicp; +std::vector nic_attr_vec; +std::vector nic_val_vec; +std::string nic_a, nic_v; + +using namespace std; + +nic_property *load_nic_property(std::string dir, std::string name){ + + string fname; + if(dir != "") + fname = dir + "/nic_property_"+name+".def"; + else + fname = "nic_property_"+name+".def"; + + FILE *nicf = fopen(fname.c_str(),"r"); + if(! nicf){ + fprintf(stderr,"ERROR, can't open nic property file %s\n",fname.c_str()); + return NULL; + } + +NicParserdebug = 0; + nicp = new nic_property(); + NicParser_setfileinput(nicf); + if(NicParserparse()){ + fprintf(stderr,"could not parse nic property file %s\n",fname.c_str()); + return NULL; + } + + return nicp; +} + +bool nic_property::legal_type(string t){ +int i; + for(i=0;i