Enumerate the event codes for the transport layer transmission methods.
We add a new event code that indicates a one step event message. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
4ef70c3d2e
commit
24385005b8
2
raw.c
2
raw.c
|
@ -286,7 +286,7 @@ static int raw_send(struct transport *t, struct fdarray *fda, int event, int pee
|
||||||
/*
|
/*
|
||||||
* Get the time stamp right away.
|
* Get the time stamp right away.
|
||||||
*/
|
*/
|
||||||
return event ? sk_receive(fd, pkt, len, hwts, MSG_ERRQUEUE) : cnt;
|
return event == TRANS_EVENT ? sk_receive(fd, pkt, len, hwts, MSG_ERRQUEUE) : cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void raw_release(struct transport *t)
|
static void raw_release(struct transport *t)
|
||||||
|
|
10
transport.h
10
transport.h
|
@ -34,6 +34,16 @@ enum transport_type {
|
||||||
TRANS_UDS,
|
TRANS_UDS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Values for the 'event' parameter in transport_send() and
|
||||||
|
* transport_peer().
|
||||||
|
*/
|
||||||
|
enum transport_event {
|
||||||
|
TRANS_GENERAL,
|
||||||
|
TRANS_EVENT,
|
||||||
|
TRANS_ONESTEP,
|
||||||
|
};
|
||||||
|
|
||||||
enum timestamp_type {
|
enum timestamp_type {
|
||||||
TS_SOFTWARE,
|
TS_SOFTWARE,
|
||||||
TS_HARDWARE,
|
TS_HARDWARE,
|
||||||
|
|
2
udp.c
2
udp.c
|
@ -198,7 +198,7 @@ static int udp_send(struct transport *t, struct fdarray *fda, int event, int pee
|
||||||
/*
|
/*
|
||||||
* Get the time stamp right away.
|
* Get the time stamp right away.
|
||||||
*/
|
*/
|
||||||
return event ? sk_receive(fd, junk, len, hwts, MSG_ERRQUEUE) : cnt;
|
return event == TRANS_EVENT ? sk_receive(fd, junk, len, hwts, MSG_ERRQUEUE) : cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void udp_release(struct transport *t)
|
static void udp_release(struct transport *t)
|
||||||
|
|
2
udp6.c
2
udp6.c
|
@ -224,7 +224,7 @@ static int udp6_send(struct transport *t, struct fdarray *fda, int event, int pe
|
||||||
/*
|
/*
|
||||||
* Get the time stamp right away.
|
* Get the time stamp right away.
|
||||||
*/
|
*/
|
||||||
return event ? sk_receive(fd, junk, len, hwts, MSG_ERRQUEUE) : cnt;
|
return event == TRANS_EVENT ? sk_receive(fd, junk, len, hwts, MSG_ERRQUEUE) : cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void udp6_release(struct transport *t)
|
static void udp6_release(struct transport *t)
|
||||||
|
|
Loading…
Reference in New Issue