diff options
author | hm <hm@FreeBSD.org> | 2001-10-18 11:58:49 +0000 |
---|---|---|
committer | hm <hm@FreeBSD.org> | 2001-10-18 11:58:49 +0000 |
commit | 49e3567ef7c9c2e6bb7da47b86af7b991b1d1bd1 (patch) | |
tree | dcfe434253eaa1290451be56d7a4ca351036de67 /sys/i4b/layer4 | |
parent | 4153de7b054229b20a09957ffa86037f696d6da4 (diff) | |
download | FreeBSD-src-49e3567ef7c9c2e6bb7da47b86af7b991b1d1bd1.zip FreeBSD-src-49e3567ef7c9c2e6bb7da47b86af7b991b1d1bd1.tar.gz |
Add experimental support for sending keypad facility messages.
MFC after: 2 months
Diffstat (limited to 'sys/i4b/layer4')
-rw-r--r-- | sys/i4b/layer4/i4b_i4bdrv.c | 8 | ||||
-rw-r--r-- | sys/i4b/layer4/i4b_l4.c | 33 | ||||
-rw-r--r-- | sys/i4b/layer4/i4b_l4.h | 7 |
3 files changed, 39 insertions, 9 deletions
diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c index f5f3224..41b3c57 100644 --- a/sys/i4b/layer4/i4b_i4bdrv.c +++ b/sys/i4b/layer4/i4b_i4bdrv.c @@ -29,7 +29,7 @@ * * $FreeBSD$ * - * last edit-date: [Fri Jan 12 16:49:34 2001] + * last edit-date: [Wed Oct 17 13:37:56 2001] * *---------------------------------------------------------------------------*/ @@ -439,6 +439,12 @@ i4bioctl(dev_t dev, int cmd, caddr_t data, int flag, struct thread *td) strcpy(cd->dst_telno, mcr->dst_telno); strcpy(cd->src_telno, mcr->src_telno); + + if(mcr->keypad[0] != '\0') + strcpy(cd->keypad, mcr->keypad); + else + cd->keypad[0] = '\0'; + cd->display[0] = '\0'; SET_CAUSE_TYPE(cd->cause_in, CAUSET_I4B); diff --git a/sys/i4b/layer4/i4b_l4.c b/sys/i4b/layer4/i4b_l4.c index 9cb3f26..4981b96 100644 --- a/sys/i4b/layer4/i4b_l4.c +++ b/sys/i4b/layer4/i4b_l4.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,9 @@ * i4b_l4.c - kernel interface to userland * ----------------------------------------- * - * $Id: i4b_l4.c,v 1.54 2000/08/28 07:24:59 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Sun Aug 27 14:53:42 2000] + * last edit-date: [Thu Oct 18 13:31:22 2001] * *---------------------------------------------------------------------------*/ @@ -249,6 +247,33 @@ i4b_l4_dialoutnumber(int driver, int driver_unit, int cmdlen, char *cmd) } /*---------------------------------------------------------------------------* + * send MSG_KEYPAD_IND message to userland + *---------------------------------------------------------------------------*/ +void +i4b_l4_keypad(int driver, int driver_unit, int cmdlen, char *cmd) +{ + struct mbuf *m; + + if((m = i4b_Dgetmbuf(sizeof(msg_keypad_ind_t))) != NULL) + { + msg_keypad_ind_t *md = (msg_keypad_ind_t *)m->m_data; + + md->header.type = MSG_KEYPAD_IND; + md->header.cdid = -1; + + md->driver = driver; + md->driver_unit = driver_unit; + + if(cmdlen > KEYPAD_MAX) + cmdlen = KEYPAD_MAX; + + md->cmdlen = cmdlen; + bcopy(cmd, md->cmd, cmdlen); + i4bputqueue(m); + } +} + +/*---------------------------------------------------------------------------* * send MSG_NEGOTIATION_COMPL message to userland *---------------------------------------------------------------------------*/ void diff --git a/sys/i4b/layer4/i4b_l4.h b/sys/i4b/layer4/i4b_l4.h index f1ec1e2..46f9aab 100644 --- a/sys/i4b/layer4/i4b_l4.h +++ b/sys/i4b/layer4/i4b_l4.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,9 @@ * i4b_l4.h - kernel interface to userland header file * --------------------------------------------------- * - * $Id: i4b_l4.h,v 1.18 2000/04/27 11:35:01 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Thu Apr 27 13:28:01 2000] + * last edit-date: [Thu Oct 18 10:11:51 2001] * *---------------------------------------------------------------------------*/ @@ -49,6 +47,7 @@ extern void i4b_l4_daemon_attached(void); extern void i4b_l4_daemon_detached(void); extern void i4b_l4_dialout( int driver, int driver_unit ); extern void i4b_l4_dialoutnumber(int driver, int driver_unit, int cmdlen, char *cmd); +extern void i4b_l4_keypad(int driver, int driver_unit, int cmdlen, char *cmd); extern void i4b_l4_disconnect_ind ( call_desc_t *cd ); extern void i4b_l4_drvrdisc (int driver, int driver_unit ); extern void i4b_l4_negcomplete( call_desc_t *cd ); |