sys/netproto/atm/ipatm/ipatm_input.c
int
ipatm_ipinput(struct ip_nif *inp, KBuffer *m)
{
#ifdef DIAGNOSTIC
	if (ipatm_print) {
		atm_pdu_print(m, "ipatm_ipinput");
	}
#endif

#ifdef DIAGNOSTIC
	if (!KB_ISPKT(m)) {
		panic("ipatm_ipinput: no packet header");
	}
	{
		int	cnt = 0;
		KBuffer	*m0 = m;

		while (m0) {
			cnt += KB_LEN(m0);
			m0 = KB_NEXT(m0);
		}
		if (m->m_pkthdr.len != cnt) {
			panic("ipatm_ipinput: packet length incorrect");
		}
	}
#endif
	/*
	 * Save the input ifnet pointer in the packet header
	 */
	m->m_pkthdr.rcvif = (struct ifnet *)inp->inf_nif;

	/*
	 * Finally, hand packet off to IP.
	 *
	 * NB: Since we're already in the softint kernel state, we
	 * just call IP directly to avoid the extra unnecessary 
	 * kernel scheduling.
	 */
	netisr_queue(NETISR_IP, m);
	return (0);
}
/*
 * IP Input Packet Handler
 * 
 * All IP packets received from various ATM sources will be sent here
 * for final queuing to the IP layer.
 *
 * Arguments:
 *	inp	pointer to packet's receiving IP network interface
 *	m	pointer to packet buffer chain
 *
 * Returns:
 *	0	packet successfully queued to IP layer
 *	else	error queuing packet, buffer chain freed
 *
 */
IP Input Packet Handler

All IP packets received from various ATM sources will be sent here
for final queuing to the IP layer.

inp     pointer to packet's receiving IP network interface
m       pointer to packet buffer chain

0       packet successfully queued to IP layer
else    error queuing packet, buffer chain freed
IP Input Packet Handler All IP packets received from various ATM sources will be sent here for final queuing to the IP layer . inp pointer to packet ' s receiving IP network interface m pointer to packet buffer chain 0 packet successfully queued to IP layer else error queuing packet buffer chain freed
int
ipatm_ipinput(struct ip_nif *inp, KBuffer *m)
{
#ifdef DIAGNOSTIC
	if (ipatm_print) {
		atm_pdu_print(m, "ipatm_ipinput");
	}
#endif
#ifdef DIAGNOSTIC
	if (!KB_ISPKT(m)) {
		panic("ipatm_ipinput: no packet header");
	}
	{
		int	cnt = 0;
		KBuffer	*m0 = m;
		while (m0) {
			cnt += KB_LEN(m0);
			m0 = KB_NEXT(m0);
		}
		if (m->m_pkthdr.len != cnt) {
			panic("ipatm_ipinput: packet length incorrect");
		}
	}
#endif
	m->m_pkthdr.rcvif = (struct ifnet *)inp->inf_nif;
	netisr_queue(NETISR_IP, m);
	return (0);
}
int ipatm_ipinput ( struct ip_nif * inp , KBuffer * m ) { #ifdef DIAGNOSTIC if ( ipatm_print ) { atm_pdu_print ( m , " " ) ; } #endif #ifdef DIAGNOSTIC if ( ! KB_ISPKT ( m ) ) { panic ( " " ) ; } { int cnt = 0 ; KBuffer * m0 = m ; while ( m0 ) { cnt += KB_LEN ( m0 ) ; m0 = KB_NEXT ( m0 ) ; } if ( m -> m_pkthdr . len != cnt ) { panic ( " " ) ; } } #endif m -> m_pkthdr . rcvif = ( struct ifnet * ) inp -> inf_nif ; netisr_queue ( NETISR_IP , m ) ; return ( 0 ) ; }
IP Input Packet Handler
IP Input Packet Handler
/*
	 * Save the input ifnet pointer in the packet header
	 */ /*
	 * Finally, hand packet off to IP.
	 *
	 * NB: Since we're already in the softint kernel state, we
	 * just call IP directly to avoid the extra unnecessary 
	 * kernel scheduling.
	 */