kernels/linux-2.4.0/drivers/net/wan/sdla_fr.c
/*==============================================================================
 * Determine what type of UDP call it is. FPIPE8ND ?
 */
Determine what type of UDP call it is.
Determine what type of UDP call it is .
static int udp_pkt_type( struct sk_buff *skb, sdla_t* card )
{
	fr_udp_pkt_t *fr_udp_pkt = (fr_udp_pkt_t *)skb->data;
        if((fr_udp_pkt->ip_pkt.protocol == UDPMGMT_UDP_PROTOCOL) &&
		(fr_udp_pkt->ip_pkt.ver_inet_hdr_length == 0x45) &&
		(fr_udp_pkt->udp_pkt.udp_dst_port == 
		ntohs(card->wandev.udp_port)) &&
		(fr_udp_pkt->wp_mgmt.request_reply == 
		UDPMGMT_REQUEST)) {
                        if(!strncmp(fr_udp_pkt->wp_mgmt.signature,
                                UDPMGMT_FPIPE_SIGNATURE, 8))
                                return UDP_FPIPE_TYPE;
	}
        return UDP_INVALID_TYPE;
}
static int udp_pkt_type ( struct sk_buff * skb , sdla_t * card ) { fr_udp_pkt_t * fr_udp_pkt = ( fr_udp_pkt_t * ) skb -> data ; if ( ( fr_udp_pkt -> ip_pkt . protocol == UDPMGMT_UDP_PROTOCOL ) && ( fr_udp_pkt -> ip_pkt . ver_inet_hdr_length == 0x45 ) && ( fr_udp_pkt -> udp_pkt . udp_dst_port == ntohs ( card -> wandev . udp_port ) ) && ( fr_udp_pkt -> wp_mgmt . request_reply == UDPMGMT_REQUEST ) ) { if ( ! strncmp ( fr_udp_pkt -> wp_mgmt . signature , UDPMGMT_FPIPE_SIGNATURE , 8 ) ) return UDP_FPIPE_TYPE ; } return UDP_INVALID_TYPE ; }
Determine what type of UDP call it is.
Determine what type of UDP call it is .