parent
74925f43ed
commit
1e6b2a81d0
@ -3953,7 +3953,7 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
sysret_t sys_socketpair(int domain, int type, int protocol, int fd[2])
|
sysret_t sys_socketpair(int domain, int type, int protocol, int fd[2])
|
||||||
{
|
{
|
||||||
#ifdef RT_USING_SAL
|
#ifdef RT_USING_SAL
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int k_fd[2];
|
int k_fd[2];
|
||||||
@ -7045,8 +7045,13 @@ const static struct rt_syscall_def func_table[] =
|
|||||||
SYSCALL_SIGN(sys_ftruncate),
|
SYSCALL_SIGN(sys_ftruncate),
|
||||||
SYSCALL_SIGN(sys_setitimer),
|
SYSCALL_SIGN(sys_setitimer),
|
||||||
SYSCALL_SIGN(sys_utimensat),
|
SYSCALL_SIGN(sys_utimensat),
|
||||||
|
#ifdef RT_USING_POSIX_SOCKET
|
||||||
SYSCALL_SIGN(sys_notimpl),
|
SYSCALL_SIGN(sys_notimpl),
|
||||||
SYSCALL_SIGN(sys_socketpair), /* 205 */
|
SYSCALL_SIGN(sys_socketpair), /* 205 */
|
||||||
|
#else
|
||||||
|
SYSCALL_SIGN(sys_notimpl),
|
||||||
|
SYSCALL_SIGN(sys_notimpl),
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
const void *lwp_get_sys_api(rt_uint32_t number)
|
const void *lwp_get_sys_api(rt_uint32_t number)
|
||||||
|
@ -186,11 +186,11 @@ struct sockaddr
|
|||||||
/* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket. */
|
/* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket. */
|
||||||
struct sockaddr_un
|
struct sockaddr_un
|
||||||
{
|
{
|
||||||
unsigned short sa_family;
|
uint8_t sa_len;
|
||||||
|
sa_family_t sa_family;
|
||||||
char sun_path[108]; /* Path name. */
|
char sun_path[108]; /* Path name. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if NETDEV_IPV4
|
#if NETDEV_IPV4
|
||||||
/* members are in network byte order */
|
/* members are in network byte order */
|
||||||
struct sockaddr_in
|
struct sockaddr_in
|
||||||
@ -227,16 +227,6 @@ struct sockaddr_storage
|
|||||||
#endif /* NETDEV_IPV6 */
|
#endif /* NETDEV_IPV6 */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* LWIPPTP_SWREQ_0036 */
|
|
||||||
#ifndef __DEFINED_struct_iovec
|
|
||||||
struct iovec
|
|
||||||
{
|
|
||||||
void *iov_base;
|
|
||||||
size_t iov_len;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* LWIPPTP_SWREQ_0036 */
|
|
||||||
struct msghdr
|
struct msghdr
|
||||||
{
|
{
|
||||||
void *msg_name;
|
void *msg_name;
|
||||||
@ -248,7 +238,6 @@ struct msghdr
|
|||||||
int msg_flags;
|
int msg_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* LWIPPTP_SWREQ_0036 */
|
|
||||||
/* RFC 3542, Section 20: Ancillary Data */
|
/* RFC 3542, Section 20: Ancillary Data */
|
||||||
struct cmsghdr
|
struct cmsghdr
|
||||||
{
|
{
|
||||||
@ -257,7 +246,6 @@ struct cmsghdr
|
|||||||
int cmsg_type; /* protocol-specific type */
|
int cmsg_type; /* protocol-specific type */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* LWIPPTP_SWREQ_0036 */
|
|
||||||
#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg))
|
#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg))
|
||||||
|
|
||||||
#define CMSG_ALIGN(len) (((len) + sizeof(long) - 1) & ~(sizeof(long)-1))
|
#define CMSG_ALIGN(len) (((len) + sizeof(long) - 1) & ~(sizeof(long)-1))
|
||||||
@ -297,7 +285,7 @@ static inline struct cmsghdr *cmsg_nxthdr(struct msghdr *_msg, struct cmsghdr *_
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define IFNAMSIZ 16
|
#define IFNAMSIZ 16
|
||||||
struct sal_ifmap
|
struct sal_ifmap
|
||||||
{
|
{
|
||||||
unsigned long int mem_start;
|
unsigned long int mem_start;
|
||||||
unsigned long int mem_end;
|
unsigned long int mem_end;
|
||||||
@ -307,13 +295,13 @@ struct sal_ifmap
|
|||||||
unsigned char port;
|
unsigned char port;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sal_ifreq
|
struct sal_ifreq
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
char ifrn_name[IFNAMSIZ];
|
char ifrn_name[IFNAMSIZ];
|
||||||
} ifr_ifrn;
|
} ifr_ifrn;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
struct sockaddr ifru_addr;
|
struct sockaddr ifru_addr;
|
||||||
struct sockaddr ifru_dstaddr;
|
struct sockaddr ifru_dstaddr;
|
||||||
|
@ -445,7 +445,7 @@ static int socket_init(int family, int type, int protocol, struct sal_socket **r
|
|||||||
rt_bool_t flag = RT_FALSE;
|
rt_bool_t flag = RT_FALSE;
|
||||||
|
|
||||||
if (family == AF_UNIX)
|
if (family == AF_UNIX)
|
||||||
{
|
{
|
||||||
netdv_def = netdev_lo;
|
netdv_def = netdev_lo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -685,7 +685,7 @@ int sal_bind(int socket, const struct sockaddr *name, socklen_t namelen)
|
|||||||
addr_un = (struct sockaddr_un *)name;
|
addr_un = (struct sockaddr_un *)name;
|
||||||
|
|
||||||
if (addr_un->sa_family != AF_UNIX)
|
if (addr_un->sa_family != AF_UNIX)
|
||||||
{
|
{
|
||||||
/* bind network interface by ip address */
|
/* bind network interface by ip address */
|
||||||
sal_sockaddr_to_ipaddr(name, &input_ipaddr);
|
sal_sockaddr_to_ipaddr(name, &input_ipaddr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user