dovend.c (3229) | dovend.c (13572) |
---|---|
1/* 2 * dovend.c : Inserts all but the first few vendor options. 3 */ 4 5#include <sys/types.h> 6 7#include <netinet/in.h> 8#include <arpa/inet.h> /* inet_ntoa */ --- 42 unchanged lines hidden (view full) --- 51int 52dovend_rfc1497(hp, buf, len) 53 struct host *hp; 54 byte *buf; 55 int len; 56{ 57 int bytesleft = len; 58 byte *vp = buf; | 1/* 2 * dovend.c : Inserts all but the first few vendor options. 3 */ 4 5#include <sys/types.h> 6 7#include <netinet/in.h> 8#include <arpa/inet.h> /* inet_ntoa */ --- 42 unchanged lines hidden (view full) --- 51int 52dovend_rfc1497(hp, buf, len) 53 struct host *hp; 54 byte *buf; 55 int len; 56{ 57 int bytesleft = len; 58 byte *vp = buf; |
59 char *tmpstr; | |
60 61 static char noroom[] = "%s: No room for \"%s\" option"; 62#define NEED(LEN, MSG) do \ 63 if (bytesleft < (LEN)) { \ 64 report(LOG_NOTICE, noroom, \ 65 hp->hostname->string, MSG); \ 66 return (vp - buf); \ 67 } while (0) --- 147 unchanged lines hidden (view full) --- 215 * XXX - Too much magic. The user can always set the hostname 216 * to the short version in the bootptab file. -gwr 217 */ 218 if ((len + 2) > bytesleft) { 219 /* 220 * Not enough room for full (domain-qualified) hostname, try 221 * stripping it down to just the first field (host). 222 */ | 59 60 static char noroom[] = "%s: No room for \"%s\" option"; 61#define NEED(LEN, MSG) do \ 62 if (bytesleft < (LEN)) { \ 63 report(LOG_NOTICE, noroom, \ 64 hp->hostname->string, MSG); \ 65 return (vp - buf); \ 66 } while (0) --- 147 unchanged lines hidden (view full) --- 214 * XXX - Too much magic. The user can always set the hostname 215 * to the short version in the bootptab file. -gwr 216 */ 217 if ((len + 2) > bytesleft) { 218 /* 219 * Not enough room for full (domain-qualified) hostname, try 220 * stripping it down to just the first field (host). 221 */ |
223 tmpstr = hp->hostname->string; | 222 char *tmpstr = hp->hostname->string; |
224 len = 0; 225 while (*tmpstr && (*tmpstr != '.')) { 226 tmpstr++; 227 len++; 228 } 229 } 230#endif 231 NEED((len + 2), "hn"); --- 182 unchanged lines hidden --- | 223 len = 0; 224 while (*tmpstr && (*tmpstr != '.')) { 225 tmpstr++; 226 len++; 227 } 228 } 229#endif 230 NEED((len + 2), "hn"); --- 182 unchanged lines hidden --- |