struct ppp *ppp;
if (pf != 0) {
- file->private_data = NULL;
+ file->private_data = 0;
if (pf->kind == INTERFACE) {
ppp = PF_TO_PPP(pf);
if (file == ppp->owner)
struct ppp_file *pf = file->private_data;
DECLARE_WAITQUEUE(wait, current);
ssize_t ret;
- struct sk_buff *skb = NULL;
+ struct sk_buff *skb = 0;
ret = count;
/* check if we should pass this packet */
/* the filter instructions are constructed assuming
a four-byte PPP header on each packet */
- *skb_push(skb, 2) = 1;
+ {
+ u_int16_t *p = (u_int16_t *) skb_push(skb, 2);
+
+ *p = htons(4); /* indicate outbound in DLT_LINUX_SLL */;
+ }
if (ppp->pass_filter
&& sk_run_filter(skb, ppp->pass_filter,
ppp->pass_len) == 0) {
list = &ppp->channels;
if (list_empty(list)) {
/* nowhere to send the packet, just drop it */
- ppp->xmit_pending = NULL;
+ ppp->xmit_pending = 0;
kfree_skb(skb);
return;
}
spin_lock_bh(&pch->downl);
if (pch->chan) {
if (pch->chan->ops->start_xmit(pch->chan, skb))
- ppp->xmit_pending = NULL;
+ ppp->xmit_pending = 0;
} else {
/* channel got unregistered */
kfree_skb(skb);
- ppp->xmit_pending = NULL;
+ ppp->xmit_pending = 0;
}
spin_unlock_bh(&pch->downl);
return;
return;
#endif /* CONFIG_PPP_MULTILINK */
- ppp->xmit_pending = NULL;
+ ppp->xmit_pending = 0;
kfree_skb(skb);
}
/* check if the packet passes the pass and active filters */
/* the filter instructions are constructed assuming
a four-byte PPP header on each packet */
- *skb_push(skb, 2) = 0;
+ {
+ u_int16_t *p = (u_int16_t *) skb_push(skb, 2);
+
+ *p = 0; /* indicate inbound in DLT_LINUX_SLL */
+ }
if (ppp->pass_filter
&& sk_run_filter(skb, ppp->pass_filter,
ppp->pass_len) == 0) {
if (pch == 0)
return; /* should never happen */
- chan->ppp = NULL;
+ chan->ppp = 0;
/*
* This ensures that we have returned from any calls into the
*/
down_write(&pch->chan_sem);
spin_lock_bh(&pch->downl);
- pch->chan = NULL;
+ pch->chan = 0;
spin_unlock_bh(&pch->downl);
up_write(&pch->chan_sem);
ppp_disconnect_channel(pch);
ppp->xstate = 0;
xcomp = ppp->xcomp;
xstate = ppp->xc_state;
- ppp->xc_state = NULL;
+ ppp->xc_state = 0;
ppp->rstate = 0;
rcomp = ppp->rcomp;
rstate = ppp->rc_state;
- ppp->rc_state = NULL;
+ ppp->rc_state = 0;
ppp_unlock(ppp);
if (xstate) {
if (ce->comp->compress_proto == proto)
return ce;
}
- return NULL;
+ return 0;
}
/* Register a compressor */
find_compressor(int type)
{
struct compressor_entry *ce;
- struct compressor *cp = NULL;
+ struct compressor *cp = 0;
spin_lock(&compressor_list_lock);
ce = find_comp_entry(type);
down(&all_ppp_sem);
ppp_lock(ppp);
dev = ppp->dev;
- ppp->dev = NULL;
+ ppp->dev = 0;
ppp_unlock(ppp);
/* This will call dev_close() for us. */
if (dev) {
ppp_ccp_closed(ppp);
if (ppp->vj) {
slhc_free(ppp->vj);
- ppp->vj = NULL;
+ ppp->vj = 0;
}
skb_queue_purge(&ppp->file.xq);
skb_queue_purge(&ppp->file.rq);
}
if (ppp->active_filter) {
kfree(ppp->active_filter);
- ppp->active_filter = NULL;
+ ppp->active_filter = 0;
}
#endif /* CONFIG_PPP_FILTER */
if (pch->file.index == unit)
return pch;
}
- return NULL;
+ return 0;
}
/*