Lines Matching refs:sdn
281 int dn_sockaddr2username(struct sockaddr_dn *sdn, unsigned char *buf, unsigned char type) in dn_sockaddr2username() argument
289 *buf++ = sdn->sdn_objnum; in dn_sockaddr2username()
293 *buf++ = le16_to_cpu(sdn->sdn_objnamel); in dn_sockaddr2username()
294 memcpy(buf, sdn->sdn_objname, le16_to_cpu(sdn->sdn_objnamel)); in dn_sockaddr2username()
295 len = 3 + le16_to_cpu(sdn->sdn_objnamel); in dn_sockaddr2username()
300 *buf++ = le16_to_cpu(sdn->sdn_objnamel); in dn_sockaddr2username()
301 memcpy(buf, sdn->sdn_objname, le16_to_cpu(sdn->sdn_objnamel)); in dn_sockaddr2username()
302 len = 7 + le16_to_cpu(sdn->sdn_objnamel); in dn_sockaddr2username()
316 int dn_username2sockaddr(unsigned char *data, int len, struct sockaddr_dn *sdn, unsigned char *fmt) in dn_username2sockaddr() argument
322 sdn->sdn_objnum = 0; in dn_username2sockaddr()
323 sdn->sdn_objnamel = cpu_to_le16(0); in dn_username2sockaddr()
324 memset(sdn->sdn_objname, 0, DN_MAXOBJL); in dn_username2sockaddr()
335 sdn->sdn_objnum = type; in dn_username2sockaddr()
357 sdn->sdn_objnamel = cpu_to_le16(*data++); in dn_username2sockaddr()
358 len -= le16_to_cpu(sdn->sdn_objnamel); in dn_username2sockaddr()
360 if ((len < 0) || (le16_to_cpu(sdn->sdn_objnamel) > namel)) in dn_username2sockaddr()
363 memcpy(sdn->sdn_objname, data, le16_to_cpu(sdn->sdn_objnamel)); in dn_username2sockaddr()