<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<head>
<title>NaturalAccess GR303 and V5 Libraries Developer's Manual: NMS_GR303ProvisionInterface </title>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<meta name=NMSConversion content="4.0.8">
<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
<link rel="stylesheet" href="dialogic_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='dialogic.css'>");}
//-->
</script>
<style type="text/css">
<!--
table.whs1 { width:100%;   x-border-left:1px table-solid; x-border-top:1px table-solid; x-border-right:1px table-solid; x-border-bottom:1px table-solid; border-collapse:separate; border-spacing:0px; }
col.whs2 { width:22.083%; }
col.whs3 { width:77.917%; }
td.whs4 { background-color:#CCCCCC; vertical-align:top;   padding-right:10px; padding-left:10px; }
p.whs5 { font-weight:bold; }
td.whs6 { background-color:#ffffff; vertical-align:top;   padding-right:10px; padding-left:10px; }
p.whs7 { font-style:italic; font-weight:bold; }
col.whs8 { width:29.862%; }
col.whs9 { width:70.138%; }
table.whs10 {   x-border-left:1px table-solid; x-border-top:1px table-solid; x-border-right:1px table-solid; x-border-bottom:1px table-solid; border-collapse:separate; border-spacing:0px; width:100%; }
col.whs11 { width:11.606%; }
col.whs12 { width:88.394%; }
tr.whs13 { background-color:#CCCCCC; x-cell-content-align:top; vertical-align:top; }
td.whs14 { vertical-align:top; padding-left:5px;  padding-right:5px;  }
tr.whs15 { x-cell-content-align:top; vertical-align:top; }
table.whs16 {   x-border-left:1px table-solid; x-border-top:1px table-solid; x-border-right:1px table-solid; x-border-bottom:1px table-solid; border-collapse:separate; border-spacing:0px; }
col.whs17 { width:40.276%; }
col.whs18 { width:59.724%; }
div.whs19 { width:100%; }
p.whs20 { text-align:center; }
p.whs21 { text-align:center; font-size:xx-small; }
-->
</style><script type="text/javascript" language="JavaScript">
<!--
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
{
  var strNSS = "<style type='text/css'>";
  strNSS += "p.whs21 {font-size:x-small; }";
  strNSS +="</style>";
  document.write(strNSS);
}
//-->
</script>
<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-->
</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
</head>
<body><script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
	if (window.addTocInfo)
	{
	addTocInfo("NMS GR303 function reference\nNMS_GR303ProvisionInterface");
addAvenueInfo("Untitled","nmsgr303phsenddata.html","nmsgr303resetchannelstatistics.html");
addButton("show",BTN_TEXT,"Show table of contents for this manual","","","","",0,0,"","","");

	}
	if (window.writeBtnStyle)
		writeBtnStyle();

	if (window.writeIntopicBar)
		writeIntopicBar(1);

	if (window.setRelStartPage)
	{
	setRelStartPage("default.htm");

		autoSync(1);
		sendSyncInfo();
		sendAveInfoOut();
	}
}
else
	if (window.gbIE4)
		document.location.reload();
//-->
</script>
<h1>NMS_GR303ProvisionInterface</h1>

<p>Configures (provisions) the HDLC channels for the specified interface. 
 </p>

<h4>Prototype</h4>

<p>NMS_GR303_RESULT_T <span style="font-weight: bold;"><B>NMS_GR303ProvisionInterface</B></span> 
 ( NMS_GR303_INTERFACE_ID_T <span style="font-style: italic; font-weight: bold;"><I><B>interfaceId</B></I></span>, 
 DWORD <span style="font-style: italic; font-weight: bold;"><I><B>num_channels</B></I></span>, 
 NMS_GR303_CHANNEL_LOCATION_T *<span style="font-style: italic; font-weight: bold;"><I><B>channel_loc_array</B></I></span>, 
 NMS_GR303_CHANNEL_CALLBACK_T *<span style="font-style: italic; font-weight: bold;"><I><B>channel_callback</B></I></span>, 
 void *<span style="font-style: italic; font-weight: bold;"><I><B>channel_rx_buffer</B></I></span>, 
 DWORD <span style="font-style: italic; font-weight: bold;"><I><B>channel_rx_buffersize</B></I></span>)</p>

<table cellpadding="5" x-use-null-cells cellspacing="0" width="100%" border="1" class="whs1">
<col class="whs2">
<col class="whs3">

<tr>
<td bgcolor="#CCCCCC" width="22.083%" class="whs4">
<p class="whs5">Argument</p></td>
<td bgcolor="#CCCCCC" width="77.917%" class="whs4">
<p class="whs5">Description</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="22.083%" class="whs6">
<p class="whs7">interfaceId</p></td>
<td bgcolor="#FFFFFF" width="77.917%" class="whs6">
<p>Interface ID to associate with the provisioned interface. The valid 
 range for interface ID values is 0 - 256.</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="22.083%" class="whs6">
<p class="whs7">num_channels</p></td>
<td bgcolor="#FFFFFF" width="77.917%" class="whs6">
<p>Number of HDLC channels to provision (the maximum is 4).</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="22.083%" class="whs6">
<p class="whs7">channel_loc_array</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="77.917%" class="whs6">
<p>Pointer to an array of NMS_GR303_CHANNEL_LOCATION_T structures. The 
 size of the array is specified by the <span style="font-style: italic; font-weight: bold;"><I><B>num_channels</B></I></span> 
 argument. Each value in the <span style="font-style: italic; font-weight: bold;"><I><B>channel_loc_array</B></I></span> 
 defines an HDLC location.</p>
<p class=Example>typedef&nbsp;union&nbsp;_NMS_GR303_CHANNEL_LOCATION_T<br>
{<br>
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;struct&nbsp;{<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;DWORD&nbsp;&nbsp;boardNb;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;DWORD&nbsp;&nbsp;trunkNb;<br>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;DWORD&nbsp;&nbsp;timeslotNb;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;CG;<br>
} NMS_GR303_CHANNEL_LOCATION_T</p>
<p>The application must fill in a location structure that corresponds to 
 the board family it is using (this is defined when invoking <a href="nmsgr303initialize.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303Initialize</B></font></span></a>).</p>
<p>See the <a href="#Details">Details</a> section for field descriptions.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="22.083%" class="whs6">
<p class="whs7">channel_callback</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="77.917%" class="whs6">
<p>Pointer to an application provided callback function. The library invokes 
 this callback whenever it must pass an event associated with a provisioned 
 HDLC channel. The application should return from this function as soon 
 as possible. The callback function is defined as follows:</p>
<p class=Example>typedef&nbsp;void(*NMS_GR303_CHANNEL_CALLBACK_T)<br>
&nbsp;(NMS_GR303_INTERFACE_ID_T&nbsp;interfaceId,<br>
&nbsp; NMS_GR303_CHANNEL_LOCATION_T&nbsp;channel_loc,&nbsp;<br>
&nbsp;&nbsp;NMS_GR303_CHANNEL_EVENT_T&nbsp;channel_event,<br>
&nbsp;&nbsp;void&nbsp;*databuffer,<br>
&nbsp;&nbsp;DWORD&nbsp;datasize);</p>
<p>See the <a href="#Details">Details</a> section for field descriptions.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="22.083%" class="whs6">
<p class="whs7">channel_rx_buffer</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="77.917%" class="whs6">
<p>Pointer to an application-allocated memory buffer.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="22.083%" class="whs6">
<p class="whs7">channel_rx_buffersize</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="77.917%" class="whs6">
<p>Size of the user allocated buffer specified by <span style="font-style: italic; font-weight: bold;"><I><B>channel_rx_buffer</B></I></span>. 
 The minimum requirement for <span style="font-style: italic; font-weight: bold;"><I><B>channel_rx_buffersize</B></I></span> 
 is defined by the NMS_GR303_RX_BUFFER_SIZE parameter.</p></td></tr>
</table><br>

<h4>Return values</h4>

<table cellpadding="5" x-use-null-cells cellspacing="0" width="100%" border="1" class="whs1">
<col class="whs8">
<col class="whs9">

<tr>
<td bgcolor="#CCCCCC" width="29.862%" class="whs4">
<p class="whs5">Return value</p></td>
<td bgcolor="#CCCCCC" width="70.138%" class="whs4">
<p class="whs5">Description</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="29.862%" class="whs6">
<p>NMSGR303_SUCCESS</p></td>
<td bgcolor="#FFFFFF" width="70.138%" class="whs6">
<p>&nbsp;</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="29.862%" class="whs6">
<p>NMSGR303_ALREADY_INITIALIZED</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="70.138%" class="whs6">
<p>Specified interface already exists.</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="29.862%" class="whs6">
<p>NMSGR303_INTERNAL_FAILURE</p></td>
<td bgcolor="#FFFFFF" width="70.138%" class="whs6">
<p>Internal failure. Refer to the trace log for more information.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="29.862%" class="whs6">
<p>NMSGR303_INVALID_PARMS</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="70.138%" class="whs6">
<p>One or more of the function arguments are invalid.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="29.862%" class="whs6">
<p>NMSGR303_NOT_INITIALIZED</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="70.138%" class="whs6">
<p>NMS GR303 library was not initialized with <a href="nmsgr303initialize.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303Initialize</B></font></span></a>.</p></td></tr>
</table><br>

<h4><a name=Details></a>Details</h4>

<p><span style="font-weight: bold;"><B>NMS_GR303ProvisionInterface</B></span>&nbsp;creates, 
 initializes, and resets the specified HDLC instances, and leaves them 
 configured but disabled. By default, <span style="font-weight: bold;"><B>NMS_GR303ProvisionInterface</B></span> 
 sets the signaling mode for the HDLC channel timeslots to RAW (or non-CAS). 
 </p>

<p>Applications should call <span style="font-weight: bold;"><B>NMS_GR303ProvisionInterface</B></span> 
 before calling <a href="nmsgr303startinterface.html"><span style="color: #0000ff;
	font-weight: bold;
	x-text-underline: off;
	/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StartInterface</B></font></span></a>. 
 After the application stops an interface with <a href="nmsgr303stopinterface.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StopInterface</B></font></span></a>, 
 the application does not need to re-provision the interface before restarting 
 the interface (unless the application wants to change its configuration). 
 To re-provision an existing configuration, the application must first 
 call <a href="nmsgr303destroyinterface.html"><span style="color: #0000ff;
															font-weight: bold;
															x-text-underline: off;
															/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303DestroyInterface</B></font></span></a> 
 to destroy the provisioned configuration. However, the application can 
 add or delete HDLC channels without re-provisioning the entire interface 
 by invoking <a href="nmsgr303modifychannellocation.html"><span style="color: #0000ff;
	font-weight: bold;
	x-text-underline: off;
	/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ModifyChannelLocation</B></font></span></a>. 
 </p>

<p class=Note><span style="font-weight: bold;"><B>Note: </B></span>The application 
 does not need to specify primary and backup HDLC channel assignments to 
 NMS GR303. </p>

<p>The NMS_GR303_CHANNEL_LOCATION_T structure includes the following information: 
 </p>

<table cellpadding="5" x-use-null-cells width="100%" cellspacing="0" border="1" class="whs10">
<col class="whs11">
<col class="whs12">

<tr bgcolor="#CCCCCC" valign="top" class="whs13">
<td width="11.606%" class="whs14">
<p class="whs5">Field</p></td>
<td width="88.394%" class="whs14">
<p class="whs5">Description</p></td></tr>

<tr valign="top" class="whs15">
<td width="11.606%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >boardNb</font></span></p></td>
<td width="88.394%" class="whs14">
<p>Logical board number where an HDLC instance is located (as defined by 
 NMS OAM).</p></td></tr>

<tr valign="top" class="whs15">
<td width="11.606%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >trunkNb</font></span></p></td>
<td width="88.394%" class="whs14">
<p>Logical trunk number associated with the HDLC instance (as defined by 
 NMS OAM).</p></td></tr>

<tr valign="top" class="whs15">
<td width="11.606%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >timeslotNb</font></span></p></td>
<td width="88.394%" class="whs14">
<p>Physical timeslot number associated with the HDLC instance.</p></td></tr>
</table><br>

<p>When defining the <span style="font-weight: bold;"><B>channel_callback</B></span> 
 function, the application specifies the following arguments: </p>

<table cellpadding="5" x-use-null-cells cellspacing="0" border="1" class="whs16">

<tr bgcolor="#CCCCCC" valign="top" class="whs13">
<td class="whs14">
<p class="whs5">Argument</p></td>
<td class="whs14">
<p class="whs5">Description</p></td></tr>

<tr valign="top" class="whs15">
<td class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >interfaceId</font></span></p></td>
<td class="whs14">
<p>The interface ID upon which the HDLC channel is provisioned.</p></td></tr>

<tr valign="top" class="whs15">
<td class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >channel_loc</font></span></p></td>
<td class="whs14">
<p>HDLC location structure.</p></td></tr>

<tr valign="top" class="whs15">
<td class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >channel_event</font></span></p></td>
<td class="whs14">
<p>HDLC channel event value, as defined in the next table.</p></td></tr>

<tr valign="top" class="whs15">
<td class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >databuffer</font></span></p></td>
<td class="whs14">
<p>A pointer to the buffer attached to the event. When the <span style="font-weight: bold;"><B>channel_callback</B></span> 
 function returns, the library assumes that the application finished processing 
 the <span style="color: #000000;
					font-style: normal;
					font-weight: normal;
					x-text-underline: off;
					x-text-overline: off;
					x-text-line-through: off;
					text-transform: none;
					vertical-align: baseline;
					/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >channel_rx_buffer</font></span> 
 and that the buffer can be overwritten.</p></td></tr>

<tr valign="top" class="whs15">
<td class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >datasize</font></span></p></td>
<td class="whs14">
<p>Size of the data saved in the buffer. The size should be 0 if there 
 is no data attached to the event.</p></td></tr>
</table><br>

<p>The channel_event field of the <span style="font-style: italic; font-weight: bold;"><I><B>channel_callback</B></I></span> 
 function can include the following events: </p>

<table cellpadding="5" x-use-null-cells width="100%" cellspacing="0" border="1" class="whs10">
<col class="whs17">
<col class="whs18">

<tr bgcolor="#CCCCCC" valign="top" class="whs13">
<td width="40.276%" class="whs14">
<p class="whs5">Event name</p></td>
<td width="59.724%" class="whs14">
<p class="whs5">Description</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_RX_ABORT</font></span></p></td>
<td width="59.724%" class="whs14">
<p>The HDLC channel received an ABORT sequence. No data is available and 
 no buffer is attached.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_RX_BUFFER_OVERFLOW</font></span></p></td>
<td width="59.724%" class="whs14">
<p>An internal HDLC receive buffer overflow occurred. The HDLC received 
 a frame of invalid length. No data is available and no buffer is attached. 
 </p>
<p>Not supported for CG 6100C or CG 6500C boards.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_RX_CRC_ERROR</font></span></p></td>
<td width="59.724%" class="whs14">
<p>The HDLC channel received a bad CRC for the receive frame. No data is 
 available and no buffer is attached.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_RX_ERROR</font></span></p></td>
<td width="59.724%" class="whs14">
<p>An HDLC receive error was returned. No data is available and no buffer 
 is attached.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_RX_FIFO_OVERRUN</font></span></p></td>
<td width="59.724%" class="whs14">
<p>A FIFO overrun occurred. No data is available and no buffer is attached. 
 </p>
<p>Not supported for CG 6100C or CG 6500C boards.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_RX_MAX_LENGTH_VIOLATION</font></span></p></td>
<td width="59.724%" class="whs14">
<p>Not supported.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_RX_NON_ALIGNED_OCTET</font></span></p></td>
<td width="59.724%" class="whs14">
<p>The HDLC channel received an incomplete frame. No data is available 
 and no buffer is attached.</p>
<p>Not supported for CG 6100C or CG 6500C boards.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_RX_SUCCESS</font></span></p></td>
<td width="59.724%" class="whs14">
<p>A new HDLC frame was received and is available inside <span style="font-style: italic; font-weight: bold;"><I><B>databuffer</B></I></span>. 
 <span style="font-style: italic; font-weight: bold;"><I><B>datasize</B></I></span> is<span 
 style="font-style: italic; font-weight: bold;"> <I><B></B></I></span>set to the frame 
 size.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_TX_ERROR</font></span></p></td>
<td width="59.724%" class="whs14">
<p>An internal HDLC transmit error occurred (no buffer is attached).</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_TX_FIFO_OVERRUN</font></span></p></td>
<td width="59.724%" class="whs14">
<p>An HDLC transmit FIFO overrun occurred. No buffer is attached.</p>
<p>Not supported for CG 6100C or CG 6500C boards.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_TX_FIFO_UNDERRUN</font></span></p></td>
<td width="59.724%" class="whs14">
<p>An HDLC transmit FIFO underrun occurred. No buffer is attached.</p>
<p>Not supported for CG 6100C or CG 6500C boards.</p></td></tr>

<tr valign="top" class="whs15">
<td width="40.276%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_EVENT_TX_QUEUE_FULL</font></span></p></td>
<td width="59.724%" class="whs14">
<p>The HDLC transmit internal send queue is full. No buffer is attached. 
 This indicates an abnormal send rate.</p></td></tr>
</table><br>

<h4>Example</h4>

<p class=Example>void&nbsp;&nbsp;ProvisionInterface(&nbsp;void&nbsp;)<br>
{<br>
&nbsp;&nbsp;&nbsp;&nbsp;NMS_INTERFACE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewInterface&nbsp;=&nbsp;{0};<br>
&nbsp;&nbsp;&nbsp;&nbsp;NMS_GR303_RESULT_T&nbsp;&nbsp;&nbsp;&nbsp;NmsResult;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selection;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;NMS_GR303ProvisionInterface:\n&quot;);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Set&nbsp;parameters&nbsp;*/<br>
&nbsp;&nbsp;&nbsp;&nbsp;promptdw_nodft(&quot;Enter&nbsp;interfaceId&quot;,&nbsp;&amp;NewInterface.InterfaceId);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;NewInterface.ChannelRxBufferSize&nbsp;=&nbsp;NMS_GR303_RX_BUFFER_SIZE;<br>
&nbsp;&nbsp;&nbsp;&nbsp;NewInterface.ChannelRxBuffer&nbsp;=&nbsp;calloc(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewInterface.ChannelRxBufferSize,&nbsp;1&nbsp;);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Configure&nbsp;channel&nbsp;parameters&nbsp;*/<br>
&nbsp;&nbsp;&nbsp;&nbsp;do<br>
&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selection&nbsp;=&nbsp;'y';<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;promptchar(&quot;Add&nbsp;a&nbsp;new&nbsp;channel&nbsp;?&nbsp;(y/n)&quot;,&nbsp;&amp;Selection&nbsp;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(Selection&nbsp;==&nbsp;'y')<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetChannelLocationNMS(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;NewInterface.NMS_Channels[NewInterface.NumChannels++]&nbsp;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
&nbsp;&nbsp;&nbsp;&nbsp;}<br>
&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(Selection&nbsp;!=&nbsp;'n'&nbsp;&amp;&amp;&nbsp;NewInterface.NumChannels&nbsp;&lt;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NMS_GR303_CHANNEL_LOCATIONS);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;NmsResult&nbsp;=&nbsp;<span style="font-weight: bold;"><B>NMS_GR303ProvisionInterface</B></span>&nbsp;(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewInterface.InterfaceId,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;NewInterface.NumChannels,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewInterface.NMS_Channels,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ChannelCallBackFunction,<br>
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewInterface.ChannelRxBuffer,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewInterface.ChannelRxBufferSize);<br>
&nbsp;&nbsp;&nbsp;&nbsp;Result=%s\n&quot;,PRINT_RESULT(NmsResult));<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;if(&nbsp;NMSGR303_SUCCESS&nbsp;!=&nbsp;NmsResult&nbsp;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Discard&nbsp;bad&nbsp;interface&nbsp;configuration&nbsp;*/<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(NewInterface.ChannelRxBuffer);&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
}</p>

<div placeholder id="footer" class="whs19">
 <p align="center" class="whs20">&nbsp;</p>
 <p align="center" class="whs20"><script type="text/javascript" language="JavaScript1.2">var mailSubject = 'Documentation link: ' + document.title;
var mailBody = 'Link to reference this topic:%0A %0A' + location.href;
var mailDisplay = '<img src="send_link.gif" border="0" alt="Send link to this topic">'; 
document.write( 
'<a href="mailto:Enter recipient email address' 
+ '?subject=' + escape(mailSubject) 
+ '&body=' + (mailBody) 
+ '">' + mailDisplay + '</a>' 
);</script></p>
 <p align="center" class="whs21">&#169; 
 Copyright 2009 Dialogic Corporation. All rights reserved.</p>
</div>
<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
	writeIntopicBar(0);
//-->
</script>
</body>
</html>

