Lines Matching refs:spn
138 static inline void pn_sockaddr_set_addr(struct sockaddr_pn *spn, __u8 addr) in pn_sockaddr_set_addr() argument
140 spn->spn_dev &= 0x03; in pn_sockaddr_set_addr()
141 spn->spn_dev |= addr & 0xfc; in pn_sockaddr_set_addr()
144 static inline void pn_sockaddr_set_port(struct sockaddr_pn *spn, __u16 port) in pn_sockaddr_set_port() argument
146 spn->spn_dev &= 0xfc; in pn_sockaddr_set_port()
147 spn->spn_dev |= (port >> 8) & 0x03; in pn_sockaddr_set_port()
148 spn->spn_obj = port & 0xff; in pn_sockaddr_set_port()
151 static inline void pn_sockaddr_set_object(struct sockaddr_pn *spn, in pn_sockaddr_set_object() argument
154 spn->spn_dev = pn_dev(handle); in pn_sockaddr_set_object()
155 spn->spn_obj = pn_obj(handle); in pn_sockaddr_set_object()
158 static inline void pn_sockaddr_set_resource(struct sockaddr_pn *spn, in pn_sockaddr_set_resource() argument
161 spn->spn_resource = resource; in pn_sockaddr_set_resource()
164 static inline __u8 pn_sockaddr_get_addr(const struct sockaddr_pn *spn) in pn_sockaddr_get_addr() argument
166 return spn->spn_dev & 0xfc; in pn_sockaddr_get_addr()
169 static inline __u16 pn_sockaddr_get_port(const struct sockaddr_pn *spn) in pn_sockaddr_get_port() argument
171 return ((spn->spn_dev & 0x03) << 8) | spn->spn_obj; in pn_sockaddr_get_port()
174 static inline __u16 pn_sockaddr_get_object(const struct sockaddr_pn *spn) in pn_sockaddr_get_object() argument
176 return pn_object(spn->spn_dev, spn->spn_obj); in pn_sockaddr_get_object()
179 static inline __u8 pn_sockaddr_get_resource(const struct sockaddr_pn *spn) in pn_sockaddr_get_resource() argument
181 return spn->spn_resource; in pn_sockaddr_get_resource()