Lines Matching refs:sid
115 static inline bool stage_session(__be16 sid) in stage_session() argument
117 return sid != 0; in stage_session()
127 return a->sid == b->sid && ether_addr_equal(a->remote, b->remote); in cmp_2_addr()
130 static inline int cmp_addr(struct pppoe_addr *a, __be16 sid, char *addr) in cmp_addr() argument
132 return a->sid == sid && ether_addr_equal(a->remote, addr); in cmp_addr()
139 static int hash_item(__be16 sid, unsigned char *addr) in hash_item() argument
147 hash ^= (__force __u32)sid >> i; in hash_item()
159 static struct pppox_sock *__get_item(struct pppoe_net *pn, __be16 sid, in __get_item() argument
162 int hash = hash_item(sid, addr); in __get_item()
167 if (cmp_addr(&ret->pppoe_pa, sid, addr) && in __get_item()
179 int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); in __set_item()
197 static void __delete_item(struct pppoe_net *pn, __be16 sid, in __delete_item() argument
200 int hash = hash_item(sid, addr); in __delete_item()
207 if (cmp_addr(&ret->pppoe_pa, sid, addr) && in __delete_item()
223 static inline struct pppox_sock *get_item(struct pppoe_net *pn, __be16 sid, in get_item() argument
229 po = __get_item(pn, sid, addr, ifindex); in get_item()
251 pppox_sock = get_item(pn, sp->sa_addr.pppoe.sid, in get_item_by_addr()
258 static inline void delete_item(struct pppoe_net *pn, __be16 sid, in delete_item() argument
262 __delete_item(pn, sid, addr, ifindex); in delete_item()
447 po = get_item(pn, ph->sid, eth_hdr(skb)->h_source, dev->ifindex); in pppoe_rcv()
504 po = get_item(pn, ph->sid, eth_hdr(skb)->h_source, dev->ifindex); in pppoe_disc_rcv()
596 delete_item(pn, po->pppoe_pa.sid, po->pppoe_pa.remote, in pppoe_release()
633 stage_session(sp->sa_addr.pppoe.sid)) in pppoe_connect()
639 !stage_session(sp->sa_addr.pppoe.sid)) in pppoe_connect()
645 if (stage_session(po->pppoe_pa.sid)) { in pppoe_connect()
648 delete_item(pn, po->pppoe_pa.sid, in pppoe_connect()
666 if (stage_session(sp->sa_addr.pppoe.sid)) { in pppoe_connect()
699 delete_item(pn, po->pppoe_pa.sid, in pppoe_connect()
707 po->num = sp->sa_addr.pppoe.sid; in pppoe_connect()
858 hdr.sid = po->num; in pppoe_sendmsg()
946 ph->sid = po->num; in __pppoe_xmit()
1048 po->pppoe_pa.sid, po->pppoe_pa.remote, dev_name); in pppoe_seq_show()
1095 int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); in pppoe_seq_next()