Lines Matching refs:spn
131 static __inline__ void pn_sockaddr_set_addr(struct sockaddr_pn *spn, __u8 addr)
133 spn->spn_dev &= 0x03;
134 spn->spn_dev |= addr & 0xfc;
137 static __inline__ void pn_sockaddr_set_port(struct sockaddr_pn *spn, __u16 port)
139 spn->spn_dev &= 0xfc;
140 spn->spn_dev |= (port >> 8) & 0x03;
141 spn->spn_obj = port & 0xff;
144 static __inline__ void pn_sockaddr_set_object(struct sockaddr_pn *spn,
147 spn->spn_dev = pn_dev(handle);
148 spn->spn_obj = pn_obj(handle);
151 static __inline__ void pn_sockaddr_set_resource(struct sockaddr_pn *spn,
154 spn->spn_resource = resource;
157 static __inline__ __u8 pn_sockaddr_get_addr(const struct sockaddr_pn *spn)
159 return spn->spn_dev & 0xfc;
162 static __inline__ __u16 pn_sockaddr_get_port(const struct sockaddr_pn *spn)
164 return ((spn->spn_dev & 0x03) << 8) | spn->spn_obj;
167 static __inline__ __u16 pn_sockaddr_get_object(const struct sockaddr_pn *spn)
169 return pn_object(spn->spn_dev, spn->spn_obj);
172 static __inline__ __u8 pn_sockaddr_get_resource(const struct sockaddr_pn *spn)
174 return spn->spn_resource;