mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-11 15:40:05 +00:00
sockets.h: minor changes, add comments for ToS options
This commit is contained in:
parent
9ccd31a12e
commit
7be9e292dc
@ -177,7 +177,22 @@ typedef struct ip_mreq {
|
|||||||
} ip_mreq;
|
} ip_mreq;
|
||||||
#endif /* LWIP_IGMP */
|
#endif /* LWIP_IGMP */
|
||||||
|
|
||||||
/* Unimplemented for now... */
|
/*
|
||||||
|
* The Type of Service provides an indication of the abstract
|
||||||
|
* parameters of the quality of service desired. These parameters are
|
||||||
|
* to be used to guide the selection of the actual service parameters
|
||||||
|
* when transmitting a datagram through a particular network. Several
|
||||||
|
* networks offer service precedence, which somehow treats high
|
||||||
|
* precedence traffic as more important than other traffic (generally
|
||||||
|
* by accepting only traffic above a certain precedence at time of high
|
||||||
|
* load). The major choice is a three way tradeoff between low-delay,
|
||||||
|
* high-reliability, and high-throughput.
|
||||||
|
* The use of the Delay, Throughput, and Reliability indications may
|
||||||
|
* increase the cost (in some sense) of the service. In many networks
|
||||||
|
* better performance for one of these parameters is coupled with worse
|
||||||
|
* performance on another. Except for very unusual cases at most two
|
||||||
|
* of these three indications should be set.
|
||||||
|
*/
|
||||||
#define IPTOS_TOS_MASK 0x1E
|
#define IPTOS_TOS_MASK 0x1E
|
||||||
#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
|
#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
|
||||||
#define IPTOS_LOWDELAY 0x10
|
#define IPTOS_LOWDELAY 0x10
|
||||||
@ -187,7 +202,13 @@ typedef struct ip_mreq {
|
|||||||
#define IPTOS_MINCOST IPTOS_LOWCOST
|
#define IPTOS_MINCOST IPTOS_LOWCOST
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Definitions for IP precedence (also in ip_tos) (Unimplemented)
|
* The Network Control precedence designation is intended to be used
|
||||||
|
* within a network only. The actual use and control of that
|
||||||
|
* designation is up to each network. The Internetwork Control
|
||||||
|
* designation is intended for use by gateway control originators only.
|
||||||
|
* If the actual use of these precedence designations is of concern to
|
||||||
|
* a particular network, it is the responsibility of that network to
|
||||||
|
* control the access to, and use of, those precedence designations.
|
||||||
*/
|
*/
|
||||||
#define IPTOS_PREC_MASK 0xe0
|
#define IPTOS_PREC_MASK 0xe0
|
||||||
#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
|
#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user