diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-08-19 18:43:38 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-08-19 18:43:38 +0200 |
commit | 4e862cbf4b3b438a07ea89438f4384bd10468ea9 (patch) | |
tree | 9e9cc25a91a7b1095566f6375deb3fc449cdc522 /src/input/misdn.c | |
parent | 7e0d006e3c7f163cf1e3621d77a7366a5a7e828a (diff) |
e1_input: rework configuration of virtual E1 line operations
struct e1inp_line_ops {
- enum e1inp_line_role role;
- char *addr;
- void *data;
+ union {
+ struct {
+ enum e1inp_line_role role; /* BSC or BTS mode. */
+ const char *addr; /* IP address .*/
+ void *dev; /* device parameters. */
+ } ipa;
+ struct {
+ const char *port; /* e.g. /dev/ttyUSB0 */
+ unsigned int delay;
+ } rs232;
+ } cfg;
Now this structure contains the configuration details for the
virtual E1 line, instead of using a pointer.
This also get the line_update callback to its original layout:
+ int (*line_update)(struct e1inp_line *line);
Diffstat (limited to 'src/input/misdn.c')
-rw-r--r-- | src/input/misdn.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/input/misdn.c b/src/input/misdn.c index 7adcaa61..bb9145f4 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -380,8 +380,7 @@ static int activate_bchan(struct e1inp_line *line, int ts, int act) return ret; } -static int mi_e1_line_update(struct e1inp_line *line, - enum e1inp_line_role role, const char *addr); +static int mi_e1_line_update(struct e1inp_line *line); struct e1inp_driver misdn_driver = { .name = "misdn", @@ -479,8 +478,7 @@ static int mi_e1_setup(struct e1inp_line *line, int release_l2) return 0; } -static int mi_e1_line_update(struct e1inp_line *line, - enum e1inp_line_role role, const char *addr) +static int mi_e1_line_update(struct e1inp_line *line) { struct mISDN_devinfo devinfo; int sk, ret, cnt; |