Changeset 0d37bf1 in rtems


Ignore:
Timestamp:
Feb 10, 2009, 8:25:06 AM (11 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
96c57dba
Parents:
282e6fd0
Message:

Cosmetics from FreeBSD.

Location:
cpukit/libnetworking
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/nfs/bootp_subr.c

    r282e6fd0 r0d37bf1  
    131131
    132132#ifdef BOOTP_DEBUG
    133 void bootpboot_p_sa(struct sockaddr *sa,struct sockaddr *ma);
     133void bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma);
    134134void bootpboot_p_ma(struct sockaddr *ma);
    135135void bootpboot_p_rtentry(struct rtentry *rt);
     
    156156
    157157#ifdef BOOTP_DEBUG
    158 void bootpboot_p_sa(sa,ma)
    159      struct sockaddr *sa;
    160      struct sockaddr *ma;
    161 {
    162   if (!sa) {
     158void
     159bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma)
     160{
     161
     162  if (sa == NULL) {
    163163    printf("(sockaddr *) <null>");
    164164    return;
     
    188188  break;
    189189  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
     194void
     195bootpboot_p_ma(struct sockaddr *ma)
     196{
     197
     198  if (ma == NULL) {
    198199    printf("<null>");
    199200    return;
    200201  }
    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
     205void
     206bootpboot_p_rtentry(struct rtentry *rt)
     207{
     208
     209  bootpboot_p_sa(rt_key(rt), rt_mask(rt));
    208210  printf(" ");
    209211  bootpboot_p_ma(rt->rt_genmask);
    210212  printf(" ");
    211   bootpboot_p_sa(rt->rt_gateway,NULL);
     213  bootpboot_p_sa(rt->rt_gateway, NULL);
    212214  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
     220void
     221bootpboot_p_tree(struct radix_node *rn)
     222{
     223
     224  while (rn != NULL) {
    221225    if (rn->rn_b < 0) {
    222226      if (rn->rn_flags & RNF_ROOT) {
     
    234238}
    235239
    236 void bootpboot_p_rtlist(void)
    237 {
     240void
     241bootpboot_p_rtlist(void)
     242{
     243
    238244  printf("Routing table:\n");
    239245  bootpboot_p_tree(rt_tables[AF_INET]->rnh_treetop);
    240246}
    241247
    242 void bootpboot_p_iflist(void)
     248void
     249bootpboot_p_iflist(void)
    243250{
    244251  struct ifnet *ifp;
     
    706713#endif
    707714
    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 #endif
    728 
    729715static void printip(char *prefix,struct in_addr addr)
    730716{
  • cpukit/libnetworking/nfsclient/nfsdiskless.h

    r282e6fd0 r0d37bf1  
    1414 *    notice, this list of conditions and the following disclaimer in the
    1515 *    documentation and/or other materials provided with the distribution.
    16  * 3. All advertising materials mentioning features or use of this software
    17  *    must display the following acknowledgement:
    18  *      This product includes software developed by the University of
    19  *      California, Berkeley and its contributors.
    2016 * 4. Neither the name of the University nor the names of its contributors
    2117 *    may be used to endorse or promote products derived from this software
Note: See TracChangeset for help on using the changeset viewer.