|
Lines 137-150
Link Here
|
| 137 |
/* |
138 |
/* |
| 138 |
* Check for room for domain_name. Add 2 to account for |
139 |
* Check for room for domain_name. Add 2 to account for |
| 139 |
* TAG_DOMAIN_NAME and length. |
140 |
* TAG_DOMAIN_NAME and length. |
|
|
141 |
* Add one more for a 'PAD' option to make |
| 142 |
* the string zero-terminated for Win95 to work. |
| 140 |
*/ |
143 |
*/ |
| 141 |
len = strlen(hp->domain_name->string); |
144 |
len = strlen(hp->domain_name->string); |
| 142 |
NEED((len + 2), "dn"); |
145 |
NEED((len + 3), "dn"); |
| 143 |
*vp++ = TAG_DOMAIN_NAME; |
146 |
*vp++ = TAG_DOMAIN_NAME; |
| 144 |
*vp++ = (byte) (len & 0xFF); |
147 |
*vp++ = (byte) (len & 0xFF); |
| 145 |
bcopy(hp->domain_name->string, vp, len); |
148 |
bcopy(hp->domain_name->string, vp, len); |
| 146 |
vp += len; |
149 |
vp += len; |
| 147 |
bytesleft -= len + 2; |
150 |
bytesleft -= len + 3; |
|
|
151 |
*vp++ = '\0'; /* Courtesy to M$ */ |
| 148 |
} |
152 |
} |
| 149 |
/* |
153 |
/* |
| 150 |
* NIS (YP) server and domain |
154 |
* NIS (YP) server and domain |
|
Lines 153-159
Link Here
|
| 153 |
if (insert_ip(TAG_NIS_SERVER, |
157 |
if (insert_ip(TAG_NIS_SERVER, |
| 154 |
hp->nis_server, |
158 |
hp->nis_server, |
| 155 |
&vp, &bytesleft)) |
159 |
&vp, &bytesleft)) |
| 156 |
NEED(8, "ds"); |
160 |
NEED(8, "ys"); |
| 157 |
} |
161 |
} |
| 158 |
if (hp->flags.nis_domain) { |
162 |
if (hp->flags.nis_domain) { |
| 159 |
/* |
163 |
/* |
|
Lines 161-167
Link Here
|
| 161 |
* TAG_NIS_DOMAIN and length. |
165 |
* TAG_NIS_DOMAIN and length. |
| 162 |
*/ |
166 |
*/ |
| 163 |
len = strlen(hp->nis_domain->string); |
167 |
len = strlen(hp->nis_domain->string); |
| 164 |
NEED((len + 2), "dn"); |
168 |
NEED((len + 2), "yn"); |
| 165 |
*vp++ = TAG_NIS_DOMAIN; |
169 |
*vp++ = TAG_NIS_DOMAIN; |
| 166 |
*vp++ = (byte) (len & 0xFF); |
170 |
*vp++ = (byte) (len & 0xFF); |
| 167 |
bcopy(hp->nis_domain->string, vp, len); |
171 |
bcopy(hp->nis_domain->string, vp, len); |
|
Lines 193-199
Link Here
|
| 193 |
if (insert_ip(TAG_NTP_SERVER, |
197 |
if (insert_ip(TAG_NTP_SERVER, |
| 194 |
hp->ntp_server, |
198 |
hp->ntp_server, |
| 195 |
&vp, &bytesleft)) |
199 |
&vp, &bytesleft)) |
| 196 |
NEED(8, "ts"); |
200 |
NEED(8, "nt"); |
| 197 |
} |
201 |
} |
| 198 |
/* |
202 |
/* |
| 199 |
* I wonder: If the hostname were "promoted" into the BOOTP |
203 |
* I wonder: If the hostname were "promoted" into the BOOTP |