412c3f0fe3
* Added optional '-S <span-spec>' argument to astribank_hexload: - Allow passing PRI span specification to EC firmware loader. - The span specifications is whitespace/comma separate list of items. - Each item is: <span>:<type> (Example: 3:T1) - The <span> may use shell-like globbing (e.g: *:E1 or [12]:T1) - Any span not matched in the span specification will be set as without the new '-S' option (i.e: depends on the '-A' option). * Adapted xpp_fxloader: - Read specification for both device label and wildcard from /etc/dahdi/span-types.conf - If the result is non-empty, pass it as '-S <span-spec>' to the EC firmware loader.
44 lines
1.3 KiB
C
44 lines
1.3 KiB
C
#ifndef PARSE_SPAN_SPECS_H
|
|
#define PARSE_SPAN_SPECS_H
|
|
|
|
/*
|
|
* Written by Oron Peled <oron@actcom.co.il>
|
|
* Copyright (C) 2014, Xorcom
|
|
*
|
|
* All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*
|
|
*/
|
|
|
|
#define MAX_SPANNO 4 /* E1/T1 spans -- always in first unit. 1-based */
|
|
|
|
enum tdm_codec {
|
|
TDM_CODEC_UNKNOWN,
|
|
TDM_CODEC_ULAW,
|
|
TDM_CODEC_ALAW,
|
|
};
|
|
|
|
struct span_specs {
|
|
char *buf;
|
|
enum tdm_codec span_is_alaw[MAX_SPANNO];
|
|
};
|
|
|
|
struct span_specs *parse_span_specifications(const char *spec_string, int default_is_alaw);
|
|
void free_span_specifications(struct span_specs *span_specs);
|
|
void print_span_specifications(struct span_specs *span_specs, FILE *output);
|
|
|
|
#endif /* PARSE_SPAN_SPECS_H */
|