/*++

*******************************************************************************
* Copyright (c) 1994-95 Digi International Inc., All Rights Reserved          *
*                                                                             *
* This  software  contains  proprietary  and  confidential   information   of *
* Digi International  Inc.   By  accepting  transfer  of this copy, Recipient *
* agrees to retain this software in  confidence,  to  prevent  disclosure  to *
* others,  and  to make no  use of this software other than that for which it *
* was delivered.  This is an unpublished copyright work  Digi   International *
* Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is *
* strictly prohibited.                                                        *
*                                                                             *
* Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc. *
* Confidential  when   combined   with   the   aggregated  modules  for  this *
* product) OBJECT CODE ONLY SOURCE MATERIALS                                  *
*                                                                             *
* (C) COPYRIGHT Digi International Inc. 1994-95                               *
*                                                                             *
* All Rights Reserved                                                         *
*                                                                             *
* US   Government   Users   Restricted   Rights   -   Use,   duplication   or *
* disclosure  restricted by GSA ADP Schedule Contract with Digi International *
* Inc.                                                                        *
*                                                                             *
*******************************************************************************

Module Name:

   send.c

Abstract:

   This module contains routines to manage sending data.

Author:

   Michael Zarns

Revision History:

   $Log: /Components/Windows/NT/Sync/Lan/SEND.C $
 * 
 * 4     9/26/96 8:25a Mikez
 * Moved all Sxb interface routines into two source files - msg.c and
 * irp.c.  
 * 
 * 3     9/19/96 9:24a Mikez
 * Added X25 PVC support.
 * 
 * 2     8/13/96 10:48a Mikez
 * Fully abstracted Frame Relay code into three routines:  FrSend,
 * FrReceive and FrInit, and one AdapterObject field: RxControlLength.
 * This revision works and support Frame Relay only.
 * 
 * 1     8/05/96 2:14p Mikez
 * 
 * 4     6/28/96 6:41a Mikez
 * Implemented changes to force transmits (MiniportSends) to complete
 * synchronously and never call NdisMSendComplete.  Also, forced spoofed
 * ARP replies to be processed via the AdapterContextTimerFunction.
 * 
 * 1     3/11/96 3:16p Mikez
 * Revision 1.4  1995/12/06  08:50:08  mikez
 * Added support for new mechanism of setting bridging/routing options.
 * 
 * Revision 1.3  1995/08/23  07:47:49  mikez
 * Fixed IP routing by adding ARP spoofing.  Added IPX routing support.
 * 
 * Revision 1.2  1995/08/17  23:39:34  mikez
 * DigiLanSend now directly calls AdapterContextTimerFunction to help
 * speed up NdisSendComplete notifications.
 * 
 * Revision 1.1  1995/08/16  12:40:16  mikez
 * Initial revision
 * 

--*/
#include "digilan.h"

extern DIGILAN_DRIVER_OBJECT DigiLanDriverObject;


//
// Function Prototypes
//

NTSTATUS
DigiLanPutMsgComplete(
	IN PDEVICE_OBJECT pDeviceObject,
	IN PIRP pIrp,
	IN PVOID Context
	);



NDIS_STATUS
DigiLanSend(
	IN NDIS_HANDLE MiniportAdapterContext,
	IN PNDIS_PACKET pNdisPacket,
	IN UINT Flags
	)
/*++

Description:

	MiniportSend transmits a packet through the network interface card onto the 
	medium.

	DigiLanSend strips the ethernet header off the packet and passes it to DigiSxb
	to be sent out the Frame Relay PVC for this adapter.

Parameters:

	MiniportAdapterContext
		The handle returned from MiniportInitialize.

	pNdisPacket
		A descriptor for the packet to be transmitted.

	Flags
		The value of the flags.

Return Value:

	NDIS_STATUS_SUCCESS, or some error value.

--*/
{
	PDIGILAN_LOGICAL_ADAPTER pAdapter;
	NDIS_STATUS Status;

	ENTER( "DigiLanSend" );

	pAdapter = MiniportAdapterContext;

	DigiDump( DIGITX, 
		       ("DigiLan Send Frame:\n"
		       "   pAdapter = 0x%x\n"
		       "   NdisPacket 0x%x\n",
		       pAdapter,
		       pNdisPacket) );

	Status = pAdapter->SyncProtocol.Send( pAdapter, pNdisPacket );	

	LEAVE( "DigiLanSend", Status );
}
