Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
b3d87f04
Commit
b3d87f04
authored
Jan 13, 2016
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: net: remove unused definitions and functions
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
c8180fa5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
42 deletions
+0
-42
ptpd_netif.h
include/ptpd_netif.h
+0
-31
net.c
lib/net.c
+0
-11
No files found.
include/ptpd_netif.h
View file @
b3d87f04
...
...
@@ -17,16 +17,6 @@
#define PTPD_SOCK_RAW_ETHERNET 1
/* used in ppsi to no aim: remove this */
#define PTPD_FLAGS_MULTICAST 0x1
// error codes (to be extended)
#define PTPD_NETIF_READY 1
#define PTPD_NETIF_OK 0
#define PTPD_NETIF_ERROR -1
#define PTPD_NETIF_NOT_READY -2
#define PTPD_NETIF_NOT_FOUND -3
// GCC-specific
#ifndef PACKED
# define PACKED __attribute__((packed))
...
...
@@ -34,20 +24,8 @@
#define PHYS_PORT_ANY (0xffff)
#define PTPD_NETIF_TX 1
#define PTPD_NETIF_RX 2
#define IFACE_NAME_LEN 16
#define SLAVE_PRIORITY_0 0
#define SLAVE_PRIORITY_1 1
#define SLAVE_PRIORITY_2 2
#define SLAVE_PRIORITY_3 3
#define SLAVE_PRIORITY_4 4
// Some system-independent definitions
typedef
uint8_t
mac_addr_t
[
6
];
typedef
uint32_t
ipv4_addr_t
;
// WhiteRabbit socket - it's void pointer as the real socket structure is private and probably platform-specific.
typedef
void
*
wr_socket_t
;
...
...
@@ -87,12 +65,6 @@ typedef struct _wr_timestamp wr_timestamp_t;
/* OK. These functions we'll develop along with network card driver. You can write your own UDP-based stubs for testing purposes. */
// Initialization of network interface:
// - opens devices
// - does necessary ioctls()
// - initializes connection with the mighty HAL daemon
int
ptpd_netif_init
(
void
);
// Creates UDP or Ethernet RAW socket (determined by sock_type) bound to bind_addr. If PTPD_FLAG_MULTICAST is set, the socket is
// automatically added to multicast group. User can specify physical_port field to bind the socket to specific switch port only.
wr_socket_t
*
ptpd_netif_create_socket
(
int
unused
,
int
unused2
,
...
...
@@ -115,9 +87,6 @@ int ptpd_netif_recvfrom(wr_socket_t * sock, wr_sockaddr_t * from, void *data,
// Closes the socket.
int
ptpd_netif_close_socket
(
wr_socket_t
*
sock
);
int
ptpd_netif_get_hw_addr
(
wr_socket_t
*
sock
,
mac_addr_t
*
mac
);
int
ptpd_netif_get_hw_addr
(
wr_socket_t
*
sock
,
mac_addr_t
*
mac
);
void
ptpd_netif_linearize_rx_timestamp
(
wr_timestamp_t
*
ts
,
int32_t
dmtd_phase
,
...
...
lib/net.c
View file @
b3d87f04
...
...
@@ -31,11 +31,6 @@ struct ethhdr {
uint16_t
ethtype
;
};
struct
timeout
{
uint64_t
start_tics
;
uint64_t
timeout
;
};
struct
sockq
{
uint8_t
buf
[
NET_SKBUF_SIZE
];
uint16_t
head
,
tail
,
avail
;
...
...
@@ -54,12 +49,6 @@ struct wrpc_socket {
static
struct
wrpc_socket
socks
[
NET_MAX_SOCKETS
];
int
ptpd_netif_init
()
{
memset
(
socks
,
0
,
sizeof
(
socks
));
return
PTPD_NETIF_OK
;
}
//#define net_verbose pp_printf
int
ptpd_netif_get_hw_addr
(
wr_socket_t
*
sock
,
mac_addr_t
*
mac
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment