arp.c (e03bb411eebf21a751f96945cd6f4df299b0440a) | arp.c (9ea1ba64dd8cb826051daeca97d10c617ea15791) |
---|---|
1/* 2 * Copyright (c) 1984, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Sun Microsystems, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 358 unchanged lines hidden (view full) --- 367int 368delete(char *host, char *info) 369{ 370 struct hostent *hp; 371 register struct sockaddr_inarp *sin = &sin_m; 372 register struct rt_msghdr *rtm = &m_rtmsg.m_rtm; 373 struct sockaddr_dl *sdl; 374 | 1/* 2 * Copyright (c) 1984, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Sun Microsystems, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 358 unchanged lines hidden (view full) --- 367int 368delete(char *host, char *info) 369{ 370 struct hostent *hp; 371 register struct sockaddr_inarp *sin = &sin_m; 372 register struct rt_msghdr *rtm = &m_rtmsg.m_rtm; 373 struct sockaddr_dl *sdl; 374 |
375 if (info && strncmp(info, "pro", 3) ) 376 export_only = 1; | |
377 getsocket(); 378 sin_m = blank_sin; | 375 getsocket(); 376 sin_m = blank_sin; |
377 if (info && strncmp(info, "pro", 3) == 0) 378 sin_m.sin_other = SIN_PROXY; |
|
379 sin->sin_addr.s_addr = inet_addr(host); 380 if (sin->sin_addr.s_addr == -1) { 381 if (!(hp = gethostbyname(host))) { 382 warnx("%s: %s", host, hstrerror(h_errno)); 383 return (1); 384 } 385 bcopy((char *)hp->h_addr, (char *)&sin->sin_addr, 386 sizeof sin->sin_addr); --- 348 unchanged lines hidden --- | 379 sin->sin_addr.s_addr = inet_addr(host); 380 if (sin->sin_addr.s_addr == -1) { 381 if (!(hp = gethostbyname(host))) { 382 warnx("%s: %s", host, hstrerror(h_errno)); 383 return (1); 384 } 385 bcopy((char *)hp->h_addr, (char *)&sin->sin_addr, 386 sizeof sin->sin_addr); --- 348 unchanged lines hidden --- |