Lines Matching refs:spn
135 static __inline__ void pn_sockaddr_set_addr(struct sockaddr_pn *spn, __u8 addr)
137 spn->spn_dev &= 0x03;
138 spn->spn_dev |= addr & 0xfc;
141 static __inline__ void pn_sockaddr_set_port(struct sockaddr_pn *spn, __u16 port)
143 spn->spn_dev &= 0xfc;
144 spn->spn_dev |= (port >> 8) & 0x03;
145 spn->spn_obj = port & 0xff;
148 static __inline__ void pn_sockaddr_set_object(struct sockaddr_pn *spn,
151 spn->spn_dev = pn_dev(handle);
152 spn->spn_obj = pn_obj(handle);
155 static __inline__ void pn_sockaddr_set_resource(struct sockaddr_pn *spn,
158 spn->spn_resource = resource;
161 static __inline__ __u8 pn_sockaddr_get_addr(const struct sockaddr_pn *spn)
163 return spn->spn_dev & 0xfc;
166 static __inline__ __u16 pn_sockaddr_get_port(const struct sockaddr_pn *spn)
168 return ((spn->spn_dev & 0x03) << 8) | spn->spn_obj;
171 static __inline__ __u16 pn_sockaddr_get_object(const struct sockaddr_pn *spn)
173 return pn_object(spn->spn_dev, spn->spn_obj);
176 static __inline__ __u8 pn_sockaddr_get_resource(const struct sockaddr_pn *spn)
178 return spn->spn_resource;