• Home
  • Raw
  • Download

Lines Matching refs:spn

137 static inline void pn_sockaddr_set_addr(struct sockaddr_pn *spn, __u8 addr)  in pn_sockaddr_set_addr()  argument
139 spn->spn_dev &= 0x03; in pn_sockaddr_set_addr()
140 spn->spn_dev |= addr & 0xfc; in pn_sockaddr_set_addr()
143 static inline void pn_sockaddr_set_port(struct sockaddr_pn *spn, __u16 port) in pn_sockaddr_set_port() argument
145 spn->spn_dev &= 0xfc; in pn_sockaddr_set_port()
146 spn->spn_dev |= (port >> 8) & 0x03; in pn_sockaddr_set_port()
147 spn->spn_obj = port & 0xff; in pn_sockaddr_set_port()
150 static inline void pn_sockaddr_set_object(struct sockaddr_pn *spn, in pn_sockaddr_set_object() argument
153 spn->spn_dev = pn_dev(handle); in pn_sockaddr_set_object()
154 spn->spn_obj = pn_obj(handle); in pn_sockaddr_set_object()
157 static inline void pn_sockaddr_set_resource(struct sockaddr_pn *spn, in pn_sockaddr_set_resource() argument
160 spn->spn_resource = resource; in pn_sockaddr_set_resource()
163 static inline __u8 pn_sockaddr_get_addr(const struct sockaddr_pn *spn) in pn_sockaddr_get_addr() argument
165 return spn->spn_dev & 0xfc; in pn_sockaddr_get_addr()
168 static inline __u16 pn_sockaddr_get_port(const struct sockaddr_pn *spn) in pn_sockaddr_get_port() argument
170 return ((spn->spn_dev & 0x03) << 8) | spn->spn_obj; in pn_sockaddr_get_port()
173 static inline __u16 pn_sockaddr_get_object(const struct sockaddr_pn *spn) in pn_sockaddr_get_object() argument
175 return pn_object(spn->spn_dev, spn->spn_obj); in pn_sockaddr_get_object()
178 static inline __u8 pn_sockaddr_get_resource(const struct sockaddr_pn *spn) in pn_sockaddr_get_resource() argument
180 return spn->spn_resource; in pn_sockaddr_get_resource()