release/src/linux/linux/drivers/net/wan/wanpipe_multppp.c
/*==============================================================================
 * Determine what type of UDP call it is. CPIPEAB ?
 */
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)
{
	 chdlc_udp_pkt_t *chdlc_udp_pkt = (chdlc_udp_pkt_t *)skb->data;
	if (!strncmp(chdlc_udp_pkt->wp_mgmt.signature,UDPMGMT_SIGNATURE,8) &&
	   (chdlc_udp_pkt->udp_pkt.udp_dst_port == ntohs(card->wandev.udp_port)) &&
	   (chdlc_udp_pkt->ip_pkt.protocol == UDPMGMT_UDP_PROTOCOL) &&
	   (chdlc_udp_pkt->wp_mgmt.request_reply == UDPMGMT_REQUEST)) {
		return UDP_CPIPE_TYPE;
	}
	else return UDP_INVALID_TYPE;
}
static int udp_pkt_type ( struct sk_buff * skb , sdla_t * card ) { chdlc_udp_pkt_t * chdlc_udp_pkt = ( chdlc_udp_pkt_t * ) skb -> data ; if ( ! strncmp ( chdlc_udp_pkt -> wp_mgmt . signature , UDPMGMT_SIGNATURE , 8 ) && ( chdlc_udp_pkt -> udp_pkt . udp_dst_port == ntohs ( card -> wandev . udp_port ) ) && ( chdlc_udp_pkt -> ip_pkt . protocol == UDPMGMT_UDP_PROTOCOL ) && ( chdlc_udp_pkt -> wp_mgmt . request_reply == UDPMGMT_REQUEST ) ) { return UDP_CPIPE_TYPE ; } else return UDP_INVALID_TYPE ; }
Determine what type of UDP call it is.
Determine what type of UDP call it is .