Changeset 8a4f22e in rtems
- Timestamp:
- Sep 16, 2007, 4:13:48 AM (13 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- b0ea4a4
- Parents:
- 33eeeb2
- Location:
- cpukit/pppd
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/pppd/auth.c
r33eeeb2 r8a4f22e 170 170 static int have_chap_secret(char *, char *, int, int *); 171 171 #if 0 172 static int ip_addr_check(u _int32_t, struct permitted_ip *);172 static int ip_addr_check(uint32_t, struct permitted_ip *); 173 173 #endif 174 174 static void free_wordlist(struct wordlist *); … … 896 896 struct hostent *hp; 897 897 struct netent *np; 898 u _int32_t a, mask, ah, offset;898 uint32_t a, mask, ah, offset; 899 899 struct ipcp_options *wo = &ipcp_wantoptions[unit]; 900 u _int32_t suggested_ip = 0;900 uint32_t suggested_ip = 0; 901 901 902 902 if (addresses[unit] != NULL) … … 937 937 } 938 938 939 mask = ~ (u _int32_t) 0;939 mask = ~ (uint32_t) 0; 940 940 offset = 0; 941 941 ptr_mask = strchr (ptr_word, '/'); … … 965 965 hp = gethostbyname(ptr_word); 966 966 if (hp != NULL && hp->h_addrtype == AF_INET) { 967 a = *(u _int32_t *)hp->h_addr;967 a = *(uint32_t *)hp->h_addr; 968 968 } else { 969 969 np = getnetbyname (ptr_word); … … 988 988 *ptr_mask = '/'; 989 989 990 if (a == (u _int32_t)-1L) {990 if (a == (uint32_t)-1L) { 991 991 warn("unknown host %s in auth. address list", ap->word); 992 992 continue; … … 999 999 } 1000 1000 a = htonl((ntohl(a) & mask) + offset); 1001 mask = ~(u _int32_t)0;1001 mask = ~(uint32_t)0; 1002 1002 } 1003 1003 ip[n].mask = htonl(mask); … … 1031 1031 auth_ip_addr(unit, addr) 1032 1032 int unit; 1033 u _int32_t addr;1033 uint32_t addr; 1034 1034 { 1035 1035 #if 0 … … 1058 1058 static int 1059 1059 ip_addr_check(addr, addrs) 1060 u _int32_t addr;1060 uint32_t addr; 1061 1061 struct permitted_ip *addrs; 1062 1062 { … … 1074 1074 int 1075 1075 bad_ip_adrs(addr) 1076 u _int32_t addr;1076 uint32_t addr; 1077 1077 { 1078 1078 addr = ntohl(addr); -
cpukit/pppd/demand.c
r33eeeb2 r8a4f22e 86 86 fcs = PPP_INITFCS; 87 87 88 ppp_send_config(0, PPP_MRU, (u _int32_t) 0, 0, 0);89 ppp_recv_config(0, PPP_MRU, (u _int32_t) 0, 0, 0);88 ppp_send_config(0, PPP_MRU, (uint32_t) 0, 0, 0); 89 ppp_recv_config(0, PPP_MRU, (uint32_t) 0, 0, 0); 90 90 91 91 #ifdef PPP_FILTER -
cpukit/pppd/ipcp.c
r33eeeb2 r8a4f22e 177 177 static int ip_demand_conf(int); 178 178 static int ip_active_pkt(u_char *, int); 179 static void create_resolv(u _int32_t, u_int32_t);179 static void create_resolv(uint32_t, uint32_t); 180 180 181 181 struct protent ipcp_protent = { … … 199 199 }; 200 200 201 static void ipcp_clear_addrs(int, u _int32_t, u_int32_t);201 static void ipcp_clear_addrs(int, uint32_t, uint32_t); 202 202 203 203 /* … … 219 219 char * 220 220 ip_ntoa(ipaddr) 221 u _int32_t ipaddr;221 uint32_t ipaddr; 222 222 { 223 223 static char b[64]; … … 258 258 char **argv; 259 259 { 260 u _int32_t dns;260 uint32_t dns; 261 261 struct hostent *hp; 262 262 263 263 dns = inet_addr(*argv); 264 if (dns == (u _int32_t) -1) {264 if (dns == (uint32_t) -1) { 265 265 if ((hp = gethostbyname(*argv)) == NULL) { 266 266 option_error("invalid address parameter '%s' for ms-dns option", … … 268 268 return 0; 269 269 } 270 dns = *(u _int32_t *)hp->h_addr;270 dns = *(uint32_t *)hp->h_addr; 271 271 } 272 272 … … 290 290 char **argv; 291 291 { 292 u _int32_t wins;292 uint32_t wins; 293 293 struct hostent *hp; 294 294 295 295 wins = inet_addr(*argv); 296 if (wins == (u _int32_t) -1) {296 if (wins == (uint32_t) -1) { 297 297 if ((hp = gethostbyname(*argv)) == NULL) { 298 298 option_error("invalid address parameter '%s' for ms-wins option", … … 300 300 return 0; 301 301 } 302 wins = *(u _int32_t *)hp->h_addr;302 wins = *(uint32_t *)hp->h_addr; 303 303 } 304 304 … … 527 527 int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \ 528 528 if (len >= addrlen) { \ 529 u _int32_t l; \529 uint32_t l; \ 530 530 PUTCHAR(opt, ucp); \ 531 531 PUTCHAR(addrlen, ucp); \ … … 544 544 if (neg) { \ 545 545 if (len >= CILEN_ADDR) { \ 546 u _int32_t l; \546 uint32_t l; \ 547 547 PUTCHAR(opt, ucp); \ 548 548 PUTCHAR(CILEN_ADDR, ucp); \ … … 584 584 ipcp_options *go = &ipcp_gotoptions[f->unit]; 585 585 u_short cilen, citype, cishort; 586 u _int32_t cilong;586 uint32_t cilong; 587 587 u_char cimaxslotindex, cicflag; 588 588 … … 619 619 if (neg) { \ 620 620 int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \ 621 u _int32_t l; \621 uint32_t l; \ 622 622 if ((len -= addrlen) < 0) \ 623 623 goto bad; \ … … 641 641 #define ACKCIDNS(opt, neg, addr) \ 642 642 if (neg) { \ 643 u _int32_t l; \643 uint32_t l; \ 644 644 if ((len -= CILEN_ADDR) < 0) \ 645 645 goto bad; \ … … 696 696 u_char citype, cilen, *next; 697 697 u_short cishort; 698 u _int32_t ciaddr1, ciaddr2, l, cidnsaddr;698 uint32_t ciaddr1, ciaddr2, l, cidnsaddr; 699 699 ipcp_options no; /* options we've seen Naks for */ 700 700 ipcp_options try; /* options to request next time */ … … 882 882 u_char cimaxslotindex, ciflag, cilen; 883 883 u_short cishort; 884 u _int32_t cilong;884 uint32_t cilong; 885 885 ipcp_options try; /* options to request next time */ 886 886 … … 896 896 p[1] == cilen && \ 897 897 p[0] == opt) { \ 898 u _int32_t l; \898 uint32_t l; \ 899 899 len -= cilen; \ 900 900 INCPTR(2, p); \ … … 941 941 len >= cilen && \ 942 942 p[0] == opt) { \ 943 u _int32_t l; \943 uint32_t l; \ 944 944 len -= cilen; \ 945 945 INCPTR(2, p); \ … … 1003 1003 u_short cilen, citype; /* Parsed len, type */ 1004 1004 u_short cishort; /* Parsed short value */ 1005 u _int32_t tl, ciaddr1, ciaddr2;/* Parsed address values */1005 uint32_t tl, ciaddr1, ciaddr2;/* Parsed address values */ 1006 1006 int rc = CONFACK; /* Final packet return code */ 1007 1007 int orc; /* Individual option return code */ … … 1058 1058 orc = CONFNAK; 1059 1059 if (!reject_if_disagree) { 1060 DECPTR(sizeof(u _int32_t), p);1060 DECPTR(sizeof(uint32_t), p); 1061 1061 tl = ntohl(wo->hisaddr); 1062 1062 PUTLONG(tl, p); … … 1081 1081 orc = CONFNAK; 1082 1082 if (!reject_if_disagree) { 1083 DECPTR(sizeof(u _int32_t), p);1083 DECPTR(sizeof(uint32_t), p); 1084 1084 tl = ntohl(wo->ouraddr); 1085 1085 PUTLONG(tl, p); … … 1115 1115 orc = CONFNAK; 1116 1116 if (!reject_if_disagree) { 1117 DECPTR(sizeof(u _int32_t), p);1117 DECPTR(sizeof(uint32_t), p); 1118 1118 tl = ntohl(wo->hisaddr); 1119 1119 PUTLONG(tl, p); … … 1145 1145 GETLONG(tl, p); 1146 1146 if (htonl(tl) != ao->dnsaddr[d]) { 1147 DECPTR(sizeof(u _int32_t), p);1147 DECPTR(sizeof(uint32_t), p); 1148 1148 tl = ntohl(ao->dnsaddr[d]); 1149 1149 PUTLONG(tl, p); … … 1165 1165 GETLONG(tl, p); 1166 1166 if (htonl(tl) != ao->winsaddr[d]) { 1167 DECPTR(sizeof(u _int32_t), p);1167 DECPTR(sizeof(uint32_t), p); 1168 1168 tl = ntohl(ao->winsaddr[d]); 1169 1169 PUTLONG(tl, p); … … 1284 1284 { 1285 1285 struct hostent *hp; 1286 u _int32_t local;1286 uint32_t local; 1287 1287 ipcp_options *wo = &ipcp_wantoptions[0]; 1288 1288 … … 1299 1299 wo->accept_local = 1; /* don't insist on this default value */ 1300 1300 if ((hp = gethostbyname(hostname)) != NULL) { 1301 local = *(u _int32_t *)hp->h_addr;1301 local = *(uint32_t *)hp->h_addr; 1302 1302 if (local != 0 && !bad_ip_adrs(local)) 1303 1303 wo->ouraddr = local; … … 1357 1357 fsm *f; 1358 1358 { 1359 u _int32_t mask;1359 uint32_t mask; 1360 1360 ipcp_options *ho = &ipcp_hisoptions[f->unit]; 1361 1361 ipcp_options *go = &ipcp_gotoptions[f->unit]; … … 1542 1542 ipcp_clear_addrs(unit, ouraddr, hisaddr) 1543 1543 int unit; 1544 u _int32_t ouraddr; /* local address */1545 u _int32_t hisaddr; /* remote address */1544 uint32_t ouraddr; /* local address */ 1545 uint32_t hisaddr; /* remote address */ 1546 1546 { 1547 1547 if (proxy_arp_set[unit]) { … … 1572 1572 static void 1573 1573 create_resolv(peerdns1, peerdns2) 1574 u _int32_t peerdns1, peerdns2;1574 uint32_t peerdns1, peerdns2; 1575 1575 { 1576 1576 /* initialize values */ … … 1611 1611 u_char *pstart, *optend; 1612 1612 u_short cishort; 1613 u _int32_t cilong;1613 uint32_t cilong; 1614 1614 1615 1615 if (plen < HEADERLEN) -
cpukit/pppd/ipcp.h
r33eeeb2 r8a4f22e 58 58 int maxslotindex; /* values for RFC1332 VJ compression neg. */ 59 59 bool cflag; 60 u _int32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */61 u _int32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */62 u _int32_t winsaddr[2]; /* Primary and secondary MS WINS entries */60 uint32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */ 61 uint32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */ 62 uint32_t winsaddr[2]; /* Primary and secondary MS WINS entries */ 63 63 } ipcp_options; 64 64 … … 69 69 extern ipcp_options ipcp_hisoptions[]; 70 70 71 char *ip_ntoa(u _int32_t);71 char *ip_ntoa(uint32_t); 72 72 73 73 extern struct protent ipcp_protent; -
cpukit/pppd/lcp.c
r33eeeb2 r8a4f22e 117 117 lcp_options lcp_allowoptions[NUM_PPP]; /* Options we allow peer to request */ 118 118 lcp_options lcp_hisoptions[NUM_PPP]; /* Options that we ack'd */ 119 u _int32_t xmit_accm[NUM_PPP][8]; /* extended transmit ACCM */119 uint32_t xmit_accm[NUM_PPP][8]; /* extended transmit ACCM */ 120 120 121 121 static int lcp_echos_pending = 0; /* Number of outstanding echo msgs */ … … 655 655 u_char cilen, citype, cichar; 656 656 u_short cishort; 657 u _int32_t cilong;657 uint32_t cilong; 658 658 659 659 /* … … 786 786 u_char citype, cichar, *next; 787 787 u_short cishort; 788 u _int32_t cilong;788 uint32_t cilong; 789 789 lcp_options no; /* options we've seen Naks for */ 790 790 lcp_options try; /* options to request next time */ … … 1097 1097 u_char cichar; 1098 1098 u_short cishort; 1099 u _int32_t cilong;1099 uint32_t cilong; 1100 1100 lcp_options try; /* options to request next time */ 1101 1101 … … 1235 1235 int cilen, citype, cichar; /* Parsed len, type, char value */ 1236 1236 u_short cishort; /* Parsed short value */ 1237 u _int32_t cilong; /* Parse long value */1237 uint32_t cilong; /* Parse long value */ 1238 1238 int rc = CONFACK; /* Final packet return code */ 1239 1239 int orc; /* Individual option return code */ … … 1638 1638 u_char *pstart, *optend; 1639 1639 u_short cishort; 1640 u _int32_t cilong;1640 uint32_t cilong; 1641 1641 1642 1642 if (plen < HEADERLEN) … … 1866 1866 int len; 1867 1867 { 1868 u _int32_t magic;1868 uint32_t magic; 1869 1869 1870 1870 /* Check the magic number - don't count replies from ourselves. */ … … 1892 1892 fsm *f; 1893 1893 { 1894 u _int32_t lcp_magic;1894 uint32_t lcp_magic; 1895 1895 u_char pkt[4], *pktp; 1896 1896 -
cpukit/pppd/lcp.h
r33eeeb2 r8a4f22e 59 59 int mru; /* Value of MRU */ 60 60 u_char chap_mdtype; /* which MD type (hashing algorithm) */ 61 u _int32_t asyncmap; /* Value of async map */62 u _int32_t magicnumber;61 uint32_t asyncmap; /* Value of async map */ 62 uint32_t magicnumber; 63 63 int numloops; /* Number of loops during magic number neg. */ 64 u _int32_t lqr_period; /* Reporting period for LQR 1/100ths second */64 uint32_t lqr_period; /* Reporting period for LQR 1/100ths second */ 65 65 } lcp_options; 66 66 … … 70 70 extern lcp_options lcp_allowoptions[]; 71 71 extern lcp_options lcp_hisoptions[]; 72 extern u _int32_t xmit_accm[][8];72 extern uint32_t xmit_accm[][8]; 73 73 74 74 #define DEFMRU 1500 /* Try for this */ -
cpukit/pppd/magic.c
r33eeeb2 r8a4f22e 52 52 * magic - Returns the next magic number. 53 53 */ 54 u _int32_t54 uint32_t 55 55 magic() 56 56 { 57 return (u _int32_t) mrand48();57 return (uint32_t) mrand48(); 58 58 } -
cpukit/pppd/magic.h
r33eeeb2 r8a4f22e 21 21 22 22 void magic_init(void); /* Initialize the magic number generator */ 23 u _int32_t magic(void); /* Returns the next magic number */23 uint32_t magic(void); /* Returns the next magic number */ -
cpukit/pppd/options.c
r33eeeb2 r8a4f22e 69 69 bool modem = 1; /* Use modem control lines */ 70 70 int inspeed = 0; /* Input/Output speed requested */ 71 u _int32_t netmask = 0; /* IP netmask to set on interface */71 uint32_t netmask = 0; /* IP netmask to set on interface */ 72 72 bool lockflag = 0; /* Create lock file to lock the serial dev */ 73 73 bool nodetach = 0; /* Don't detach from controlling tty */ … … 146 146 static int process_option(option_t *, char **); 147 147 static int n_arguments(option_t *); 148 static int number_option(char *, u _int32_t *, int);148 static int number_option(char *, uint32_t *, int); 149 149 150 150 /* … … 613 613 char **argv; 614 614 { 615 u _int32_t v;615 uint32_t v; 616 616 int iv, a; 617 617 char *sv; … … 699 699 return 0; 700 700 if (opt->flags & OPT_OR) 701 v |= *(u _int32_t *)(opt->addr);702 *(u _int32_t *)(opt->addr) = v;701 v |= *(uint32_t *)(opt->addr); 702 *(uint32_t *)(opt->addr) = v; 703 703 if (opt->addr2 && (opt->flags & OPT_A2COPY)) 704 *(u _int32_t *)(opt->addr2) = v;704 *(uint32_t *)(opt->addr2) = v; 705 705 break; 706 706 … … 1059 1059 number_option(str, valp, base) 1060 1060 char *str; 1061 u _int32_t *valp;1061 uint32_t *valp; 1062 1062 int base; 1063 1063 { … … 1084 1084 int *valp; 1085 1085 { 1086 u _int32_t v;1086 uint32_t v; 1087 1087 1088 1088 if (!number_option(str, &v, 0)) … … 1238 1238 char *arg; 1239 1239 { 1240 intspd;1241 uint32_t ret = (int)1;1242 speed_t spdValue = (speed_t)0;1240 long spd; 1241 uint32_t ret = 1; 1242 speed_t spdValue = 0; 1243 1243 char *ptr; 1244 1244 … … 1246 1246 spd = strtol(arg, &ptr, 0); 1247 1247 if (ptr == arg || *ptr != 0 || spd == 0) { 1248 ret = (int)0;1248 ret = 0; 1249 1249 } 1250 1250 else { … … 1272 1272 break; 1273 1273 default: 1274 ret = (int)0;1274 ret = 0; 1275 1275 break; 1276 1276 } … … 1351 1351 struct hostent *hp; 1352 1352 char *colon; 1353 u _int32_t local, remote;1353 uint32_t local, remote; 1354 1354 ipcp_options *wo = &ipcp_wantoptions[0]; 1355 1355 … … 1367 1367 if (colon != arg) { 1368 1368 *colon = '\0'; 1369 if ((local = inet_addr(arg)) == (u _int32_t) -1) {1369 if ((local = inet_addr(arg)) == (uint32_t) -1) { 1370 1370 if ((hp = gethostbyname(arg)) == NULL) { 1371 1371 option_error("unknown host: %s", arg); 1372 1372 return -1; 1373 1373 } else { 1374 local = *(u _int32_t *)hp->h_addr;1374 local = *(uint32_t *)hp->h_addr; 1375 1375 } 1376 1376 } … … 1388 1388 */ 1389 1389 if (*++colon != '\0') { 1390 if ((remote = inet_addr(colon)) == (u _int32_t) -1) {1390 if ((remote = inet_addr(colon)) == (uint32_t) -1) { 1391 1391 if ((hp = gethostbyname(colon)) == NULL) { 1392 1392 option_error("unknown host: %s", colon); 1393 1393 return -1; 1394 1394 } else { 1395 remote = *(u _int32_t *)hp->h_addr;1395 remote = *(uint32_t *)hp->h_addr; 1396 1396 if (remote_name[0] == 0) 1397 1397 strlcpy(remote_name, colon, sizeof(remote_name)); … … 1417 1417 char **argv; 1418 1418 { 1419 u _int32_t mask, b;1419 uint32_t mask, b; 1420 1420 int n, ok; 1421 1421 char *p, *endp; -
cpukit/pppd/pppd.h
r33eeeb2 r8a4f22e 26 26 #include <limits.h> /* for NGROUPS_MAX */ 27 27 #include <sys/param.h> /* for MAXPATHLEN and BSD4_4, if defined */ 28 #include <sys/types.h> /* for u _int32_t, if defined */28 #include <sys/types.h> /* for uint32_t, if defined */ 29 29 #include <sys/time.h> /* for struct timeval */ 30 30 #include <net/ppp_defs.h> … … 114 114 struct permitted_ip { 115 115 int permit; /* 1 = permit, 0 = forbid */ 116 u _int32_t base; /* match if (addr & mask) == base */117 u _int32_t mask; /* base and mask are in network byte order */116 uint32_t base; /* match if (addr & mask) == base */ 117 uint32_t mask; /* base and mask are in network byte order */ 118 118 }; 119 119 … … 182 182 extern bool modem; /* Use modem control lines */ 183 183 extern int inspeed; /* Input/Output speed requested */ 184 extern u _int32_t netmask; /* IP netmask to set on interface */184 extern uint32_t netmask; /* IP netmask to set on interface */ 185 185 extern bool lockflag; /* Create lock file to lock the serial dev */ 186 186 extern bool nodetach; /* Don't detach from controlling tty */ … … 347 347 int get_secret(int, char *, char *, unsigned char *, int *, int); 348 348 /* get "secret" for chap */ 349 int auth_ip_addr(int, u _int32_t);349 int auth_ip_addr(int, uint32_t); 350 350 /* check if IP address is authorized */ 351 int bad_ip_adrs(u _int32_t);351 int bad_ip_adrs(uint32_t); 352 352 /* check if IP address is unreasonable */ 353 353 … … 382 382 int read_packet(u_char *); /* Read PPP packet */ 383 383 int get_loop_output(void); /* Read pkts from loopback */ 384 void ppp_send_config(int, int, u _int32_t, int, int);384 void ppp_send_config(int, int, uint32_t, int, int); 385 385 /* Configure i/f transmit parameters */ 386 386 void ppp_set_xaccm(int, ext_accm); 387 387 /* Set extended transmit ACCM */ 388 void ppp_recv_config(int, int, u _int32_t, int, int);388 void ppp_recv_config(int, int, uint32_t, int, int); 389 389 /* Configure i/f receive parameters */ 390 390 int ccp_test(int, u_char *, int, int); … … 403 403 /* Set mode for handling packets for proto */ 404 404 int sifdown(int); /* Configure i/f down for one protocol */ 405 int sifaddr(int, u _int32_t, u_int32_t, u_int32_t);405 int sifaddr(int, uint32_t, uint32_t, uint32_t); 406 406 /* Configure IPv4 addresses for i/f */ 407 int cifaddr(int, u _int32_t, u_int32_t);407 int cifaddr(int, uint32_t, uint32_t); 408 408 /* Reset i/f IP addresses */ 409 409 #ifdef INET6 … … 413 413 /* Remove an IPv6 address from i/f */ 414 414 #endif 415 int sifdefaultroute(int, u _int32_t, u_int32_t);415 int sifdefaultroute(int, uint32_t, uint32_t); 416 416 /* Create default route through i/f */ 417 int cifdefaultroute(int, u _int32_t, u_int32_t);417 int cifdefaultroute(int, uint32_t, uint32_t); 418 418 /* Delete default route through i/f */ 419 int sifproxyarp(int, u _int32_t);419 int sifproxyarp(int, uint32_t); 420 420 /* Add proxy ARP entry for peer */ 421 int cifproxyarp(int, u _int32_t);421 int cifproxyarp(int, uint32_t); 422 422 /* Delete proxy ARP entry for peer */ 423 u _int32_t GetMask(u_int32_t); /* Get appropriate netmask for address */423 uint32_t GetMask(uint32_t); /* Get appropriate netmask for address */ 424 424 int lock(char *); /* Create lock file for device */ 425 425 int relock(int); /* Rewrite lock file with new pid */ … … 428 428 /* Write entry to wtmp file */ 429 429 int get_host_seed(void); /* Get host-dependent random number seed */ 430 int have_route_to(u _int32_t); /* Check if route to addr exists */430 int have_route_to(uint32_t); /* Check if route to addr exists */ 431 431 #ifdef PPP_FILTER 432 432 int set_filters(struct bpf_program *pass, struct bpf_program *active); -
cpukit/pppd/sys-rtems.c
r33eeeb2 r8a4f22e 87 87 88 88 static int if_is_up; /* the interface is currently up */ 89 static u _int32_t ifaddrs[2]; /* local and remote addresses we set */90 static u _int32_t default_route_gateway; /* gateway addr for default route */91 static u _int32_t proxy_arp_addr; /* remote addr for proxy arp */89 static uint32_t ifaddrs[2]; /* local and remote addresses we set */ 90 static uint32_t default_route_gateway; /* gateway addr for default route */ 91 static uint32_t proxy_arp_addr; /* remote addr for proxy arp */ 92 92 93 93 /* Prototypes for procedures local to this file. */ 94 static int dodefaultroute(u _int32_t, int);95 static int get_ether_addr(u _int32_t, struct sockaddr_dl *);94 static int dodefaultroute(uint32_t, int); 95 static int get_ether_addr(uint32_t, struct sockaddr_dl *); 96 96 97 97 … … 582 582 ppp_send_config(unit, mtu, asyncmap, pcomp, accomp) 583 583 int unit, mtu; 584 u _int32_t asyncmap;584 uint32_t asyncmap; 585 585 int pcomp, accomp; 586 586 { … … 626 626 ppp_recv_config(unit, mru, asyncmap, pcomp, accomp) 627 627 int unit, mru; 628 u _int32_t asyncmap;628 uint32_t asyncmap; 629 629 int pcomp, accomp; 630 630 { … … 875 875 sifaddr(u, o, h, m) 876 876 int u; 877 u _int32_t o, h, m;877 uint32_t o, h, m; 878 878 { 879 879 struct ifaliasreq ifra; … … 915 915 cifaddr(u, o, h) 916 916 int u; 917 u _int32_t o, h;917 uint32_t o, h; 918 918 { 919 919 struct ifaliasreq ifra; … … 940 940 sifdefaultroute(u, l, g) 941 941 int u; 942 u _int32_t l, g;942 uint32_t l, g; 943 943 { 944 944 return dodefaultroute(g, 's'); … … 951 951 cifdefaultroute(u, l, g) 952 952 int u; 953 u _int32_t l, g;953 uint32_t l, g; 954 954 { 955 955 return dodefaultroute(g, 'c'); … … 961 961 static int 962 962 dodefaultroute(g, cmd) 963 u _int32_t g;963 uint32_t g; 964 964 int cmd; 965 965 { … … 1026 1026 sifproxyarp(unit, hisaddr) 1027 1027 int unit; 1028 u _int32_t hisaddr;1028 uint32_t hisaddr; 1029 1029 { 1030 1030 int routes; … … 1076 1076 cifproxyarp(unit, hisaddr) 1077 1077 int unit; 1078 u _int32_t hisaddr;1078 uint32_t hisaddr; 1079 1079 { 1080 1080 int routes; … … 1111 1111 sifproxyarp(unit, hisaddr) 1112 1112 int unit; 1113 u _int32_t hisaddr;1113 uint32_t hisaddr; 1114 1114 { 1115 1115 struct arpreq arpreq; … … 1151 1151 cifproxyarp(unit, hisaddr) 1152 1152 int unit; 1153 u _int32_t hisaddr;1153 uint32_t hisaddr; 1154 1154 { 1155 1155 struct arpreq arpreq; … … 1176 1176 static int 1177 1177 get_ether_addr(ipaddr, hwaddr) 1178 u _int32_t ipaddr;1178 uint32_t ipaddr; 1179 1179 struct sockaddr_dl *hwaddr; 1180 1180 { 1181 1181 struct ifreq *ifr, *ifend, *ifp; 1182 u _int32_t ina, mask;1182 uint32_t ina, mask; 1183 1183 struct sockaddr_dl *dla; 1184 1184 struct ifreq ifreq; … … 1259 1259 * user-specified netmask. 1260 1260 */ 1261 u _int32_t1261 uint32_t 1262 1262 GetMask(addr) 1263 u _int32_t addr;1264 { 1265 u _int32_t mask, nmask, ina;1263 uint32_t addr; 1264 { 1265 uint32_t mask, nmask, ina; 1266 1266 struct ifreq *ifr, *ifend, ifreq; 1267 1267 struct ifconf ifc; … … 1324 1324 * through our own interface. 1325 1325 */ 1326 int have_route_to(u _int32_t addr)1326 int have_route_to(uint32_t addr) 1327 1327 { 1328 1328 return -1; -
cpukit/pppd/utils.c
r33eeeb2 r8a4f22e 108 108 char num[32]; 109 109 time_t t; 110 u _int32_t ip;110 uint32_t ip; 111 111 static char hexchars[] = "0123456789abcdef"; 112 112 struct buffer_info bufinfo; … … 198 198 break; 199 199 case 'I': 200 ip = va_arg(args, u _int32_t);200 ip = va_arg(args, uint32_t); 201 201 ip = ntohl(ip); 202 202 slprintf(num, sizeof(num), "%d.%d.%d.%d", (ip >> 24) & 0xff,
Note: See TracChangeset
for help on using the changeset viewer.