1: /*
2: * Support routines for PasswordLookup.
3: */
4: #include "PasswordLookup_defs.h"
5:
6: static int
7: sizeof_Passwd(p)
8: register Passwd *p;
9: {
10: register int size = 6;
11:
12: size += sizeof_String(&p->pw_name);
13: size += sizeof_String(&p->pw_passwd);
14: size += sizeof_String(&p->pw_comment);
15: size += sizeof_String(&p->pw_gecos);
16: size += sizeof_String(&p->pw_dir);
17: size += sizeof_String(&p->pw_shell);
18: return (size);
19: }
20:
21: static int
22: externalize_Passwd(p, buf)
23: register Passwd *p;
24: register Unspecified *buf;
25: {
26: register Unspecified *bp;
27:
28: bp = buf;
29: bp += externalize_String(&p->pw_name, bp);
30: bp += externalize_String(&p->pw_passwd, bp);
31: bp += externalize_LongCardinal(&p->pw_uid, bp);
32: bp += externalize_LongCardinal(&p->pw_gid, bp);
33: bp += externalize_LongCardinal(&p->pw_quota, bp);
34: bp += externalize_String(&p->pw_comment, bp);
35: bp += externalize_String(&p->pw_gecos, bp);
36: bp += externalize_String(&p->pw_dir, bp);
37: bp += externalize_String(&p->pw_shell, bp);
38: return (bp - buf);
39: }
40:
41: static int
42: sizeof_T_cn754_2(p)
43: register T_cn754_2 *p;
44: {
45: register int size = 0;
46:
47: size += sizeof_String(&p->errorstring);
48: return (size);
49: }
50:
51: static int
52: externalize_T_cn754_2(p, buf)
53: register T_cn754_2 *p;
54: register Unspecified *buf;
55: {
56: register Unspecified *bp;
57:
58: bp = buf;
59: bp += externalize_String(&p->errorstring, bp);
60: return (bp - buf);
61: }
62:
63: static int
64: sizeof_LookupUidResults(p)
65: register LookupUidResults *p;
66: {
67: register int size = 0;
68:
69: size += sizeof_Passwd(&p->passwd);
70: return (size);
71: }
72:
73: static int
74: externalize_LookupUidResults(p, buf)
75: register LookupUidResults *p;
76: register Unspecified *buf;
77: {
78: register Unspecified *bp;
79:
80: bp = buf;
81: bp += externalize_Passwd(&p->passwd, bp);
82: return (bp - buf);
83: }
84:
85: static int
86: sizeof_LookupUserResults(p)
87: register LookupUserResults *p;
88: {
89: register int size = 0;
90:
91: size += sizeof_Passwd(&p->passwd);
92: return (size);
93: }
94:
95: static int
96: externalize_LookupUserResults(p, buf)
97: register LookupUserResults *p;
98: register Unspecified *buf;
99: {
100: register Unspecified *bp;
101:
102: bp = buf;
103: bp += externalize_Passwd(&p->passwd, bp);
104: return (bp - buf);
105: }
106:
107: static int
108: internalize_Passwd(p, buf)
109: register Passwd *p;
110: register Unspecified *buf;
111: {
112: register Unspecified *bp;
113:
114: bp = buf;
115: bp += internalize_String(&p->pw_name, bp);
116: bp += internalize_String(&p->pw_passwd, bp);
117: bp += internalize_LongCardinal(&p->pw_uid, bp);
118: bp += internalize_LongCardinal(&p->pw_gid, bp);
119: bp += internalize_LongCardinal(&p->pw_quota, bp);
120: bp += internalize_String(&p->pw_comment, bp);
121: bp += internalize_String(&p->pw_gecos, bp);
122: bp += internalize_String(&p->pw_dir, bp);
123: bp += internalize_String(&p->pw_shell, bp);
124: return (bp - buf);
125: }
126:
127: static int
128: internalize_T_cn754_2(p, buf)
129: register T_cn754_2 *p;
130: register Unspecified *buf;
131: {
132: register Unspecified *bp;
133:
134: bp = buf;
135: bp += internalize_String(&p->errorstring, bp);
136: return (bp - buf);
137: }
138:
139: static int
140: internalize_LookupUidResults(p, buf)
141: register LookupUidResults *p;
142: register Unspecified *buf;
143: {
144: register Unspecified *bp;
145:
146: bp = buf;
147: bp += internalize_Passwd(&p->passwd, bp);
148: return (bp - buf);
149: }
150:
151: static int
152: internalize_LookupUserResults(p, buf)
153: register LookupUserResults *p;
154: register Unspecified *buf;
155: {
156: register Unspecified *bp;
157:
158: bp = buf;
159: bp += internalize_Passwd(&p->passwd, bp);
160: return (bp - buf);
161: }
Defined functions
Usage of this include