Changeset 6c18c97 in rtems


Ignore:
Timestamp:
May 22, 2012, 10:06:20 AM (8 years ago)
Author:
Sebastien Bourdeauducq <sebastien@…>
Branches:
4.11, master
Children:
8250503
Parents:
eb1951a
git-author:
Sebastien Bourdeauducq <sebastien@…> (05/22/12 10:06:20)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/06/12 11:30:14)
Message:

network/bootp: PR2031: Add and use header file

Location:
cpukit/libnetworking
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/Makefile.am

    reb1951a r6c18c97  
    55
    66EXTRA_DIST = README
     7EXTRA_DIST += rtems/bootp.h
    78
    89# poll is not supported
  • cpukit/libnetworking/nfs/bootp_subr.c

    reb1951a r6c18c97  
    7373#include <inttypes.h>
    7474
     75#include "rtems/bootp.h"
     76
    7577#define BOOTP_MIN_LEN           300     /* Minimum size of bootp udp packet */
    7678
     
    137139#endif
    138140
    139 int  bootpc_call(struct bootp_packet *call,
    140                  struct bootp_packet *reply,
    141                  struct proc *procp);
    142 
    143 int bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
    144                         struct proc *procp);
    145 
    146 int
    147 bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
    148                         struct sockaddr_in *myaddr,
    149                         struct sockaddr_in *netmask,
    150                         struct sockaddr_in *gw,
    151                         struct proc *procp);
    152 
    153141#ifdef BOOTP_DEBUG
    154142void
     
    270258 * - copy string from src to dest
    271259 */
    272 static void *bootp_strdup_realloc(char *dst,const char *src)
     260void *bootp_strdup_realloc(char *dst,const char *src)
    273261{
    274262  size_t len;
  • cpukit/libnetworking/rtems/rtems_bootp.c

    reb1951a r6c18c97  
    88#include <rtems/rtems_bsdnet.h>
    99#include <rtems/rtems_bsdnet_internal.h>
     10
     11#include "rtems/bootp.h"
    1012
    1113/*
  • cpukit/libnetworking/rtems/rtems_bsdnet_internal.h

    reb1951a r6c18c97  
    174174void ipintr (void);
    175175void arpintr (void);
    176 bool bootpc_init(bool, bool);
    177176int socket (int, int, int);
    178177int ioctl (int, ioctl_command_t, ...);
  • cpukit/libnetworking/rtems/rtems_dhcp.c

    reb1951a r6c18c97  
    100100
    101101#include "rtems/dhcp.h"
     102#include "rtems/bootp.h"
    102103
    103104#ifndef EALEN
     
    166167  unsigned char  vend[312];
    167168};
    168 
    169 /*
    170  * External Declarations for Functions found in
    171  * rtems/c/src/libnetworking/nfs/
    172  */
    173 extern int bootpc_call (struct dhcp_packet *call,
    174                         struct dhcp_packet *reply,
    175                         struct proc *procp);
    176 extern int bootpc_fakeup_interface (struct ifreq *ireq,
    177                                     struct socket *so,
    178                                     struct proc *procp);
    179 extern int bootpc_adjust_interface (struct ifreq *ireq,
    180                                     struct socket *so,
    181                                     struct sockaddr_in *myaddr,
    182                                     struct sockaddr_in *netmask,
    183                                     struct sockaddr_in *gw,
    184                                     struct proc *procp);
    185 extern void *bootp_strdup_realloc (char *dst,
    186                                    const char *src);
    187169
    188170/*
     
    756738       * Send the Request.
    757739       */
    758       error = bootpc_call (&call, &dhcp_req, procp);
     740      error = bootpc_call ((struct bootp_packet *)&call, (struct bootp_packet *)&dhcp_req, procp);
    759741      if (error) {
    760742        rtems_bsdnet_semaphore_release ();
     
    961943   * Send the Discover.
    962944   */
    963   error = bootpc_call (&call, &reply, procp);
     945  error = bootpc_call ((struct bootp_packet *)&call, (struct bootp_packet *)&reply, procp);
    964946  if (error) {
    965947    printf ("BOOTP call failed -- %s\n", strerror(error));
     
    990972  dhcp_request_req (&call, &reply, sdl, true);
    991973
    992   error = bootpc_call (&call, &reply, procp);
     974  error = bootpc_call ((struct bootp_packet *)&call, (struct bootp_packet *)&reply, procp);
    993975  if (error) {
    994976    printf ("BOOTP call failed -- %s\n", strerror(error));
Note: See TracChangeset for help on using the changeset viewer.