Changeset 0d37bf1 in rtems
- Timestamp:
- 02/10/09 08:25:06 (15 years ago)
- Branches:
- 4.10, 4.11, 5, master
- Children:
- 96c57dba
- Parents:
- 282e6fd0
- Location:
- cpukit/libnetworking
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libnetworking/nfs/bootp_subr.c
r282e6fd0 r0d37bf1 131 131 132 132 #ifdef BOOTP_DEBUG 133 void bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma);133 void bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma); 134 134 void bootpboot_p_ma(struct sockaddr *ma); 135 135 void bootpboot_p_rtentry(struct rtentry *rt); … … 156 156 157 157 #ifdef BOOTP_DEBUG 158 void bootpboot_p_sa(sa,ma)159 struct sockaddr *sa; 160 struct sockaddr *ma; 161 { 162 if ( !sa) {158 void 159 bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma) 160 { 161 162 if (sa == NULL) { 163 163 printf("(sockaddr *) <null>"); 164 164 return; … … 188 188 break; 189 189 default: 190 printf("af%d",sa->sa_family); 191 } 192 } 193 194 void bootpboot_p_ma(ma) 195 struct sockaddr *ma; 196 { 197 if (!ma) { 190 printf("af%d",sa->sa_family); 191 } 192 } 193 194 void 195 bootpboot_p_ma(struct sockaddr *ma) 196 { 197 198 if (ma == NULL) { 198 199 printf("<null>"); 199 200 return; 200 201 } 201 printf("%x",*(int*)ma); 202 } 203 204 void bootpboot_p_rtentry(rt) 205 struct rtentry *rt; 206 { 207 bootpboot_p_sa(rt_key(rt),rt_mask(rt)); 202 printf("%x", *(int*)ma); 203 } 204 205 void 206 bootpboot_p_rtentry(struct rtentry *rt) 207 { 208 209 bootpboot_p_sa(rt_key(rt), rt_mask(rt)); 208 210 printf(" "); 209 211 bootpboot_p_ma(rt->rt_genmask); 210 212 printf(" "); 211 bootpboot_p_sa(rt->rt_gateway, NULL);213 bootpboot_p_sa(rt->rt_gateway, NULL); 212 214 printf(" "); 213 printf("flags %x",(unsigned short) rt->rt_flags); 214 printf(" %d",rt->rt_rmx.rmx_expire); 215 printf(" %s%d\n",rt->rt_ifp->if_name,rt->rt_ifp->if_unit); 216 } 217 void bootpboot_p_tree(rn) 218 struct radix_node *rn; 219 { 220 while (rn) { 215 printf("flags %x", (unsigned short) rt->rt_flags); 216 printf(" %d", rt->rt_rmx.rmx_expire); 217 printf(" %s%d\n", rt->rt_ifp->if_name,rt->rt_ifp->if_unit); 218 } 219 220 void 221 bootpboot_p_tree(struct radix_node *rn) 222 { 223 224 while (rn != NULL) { 221 225 if (rn->rn_b < 0) { 222 226 if (rn->rn_flags & RNF_ROOT) { … … 234 238 } 235 239 236 void bootpboot_p_rtlist(void) 237 { 240 void 241 bootpboot_p_rtlist(void) 242 { 243 238 244 printf("Routing table:\n"); 239 245 bootpboot_p_tree(rt_tables[AF_INET]->rnh_treetop); 240 246 } 241 247 242 void bootpboot_p_iflist(void) 248 void 249 bootpboot_p_iflist(void) 243 250 { 244 251 struct ifnet *ifp; … … 706 713 #endif 707 714 708 #if !defined(__rtems__)709 static char *710 substr(char *a, char *b)711 {712 char *loc1;713 char *loc2;714 715 while (*a != '\0') {716 loc1 = a;717 loc2 = b;718 while (*loc1 == *loc2++) {719 if (*loc1 == '\0') return (0);720 loc1++;721 if (*loc2 == '\0') return (loc1);722 }723 a++;724 }725 return (0);726 }727 #endif728 729 715 static void printip(char *prefix,struct in_addr addr) 730 716 { -
cpukit/libnetworking/nfsclient/nfsdiskless.h
r282e6fd0 r0d37bf1 14 14 * notice, this list of conditions and the following disclaimer in the 15 15 * documentation and/or other materials provided with the distribution. 16 * 3. All advertising materials mentioning features or use of this software17 * must display the following acknowledgement:18 * This product includes software developed by the University of19 * California, Berkeley and its contributors.20 16 * 4. Neither the name of the University nor the names of its contributors 21 17 * may be used to endorse or promote products derived from this software
Note: See TracChangeset
for help on using the changeset viewer.