mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[DCCP]: Allow default/fallback service code.
This has been discussed on dccp@vger and removes the necessity for applications to supply service codes in each and every case. If an application does not want to provide a service code, that's fine, it will be given 0. Otherwise, service codes can be set via socket options as before. This patch has been tested using various client/server configurations (including listening on multiple service codes). Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
1ab9dd0902
commit
00e4d116a7
4 changed files with 7 additions and 21 deletions
|
@ -404,6 +404,7 @@ struct dccp_service_list {
|
|||
};
|
||||
|
||||
#define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1)
|
||||
#define DCCP_SERVICE_CODE_IS_ABSENT 0
|
||||
|
||||
static inline int dccp_list_has_service(const struct dccp_service_list *sl,
|
||||
const __be32 service)
|
||||
|
@ -484,11 +485,6 @@ static inline struct dccp_minisock *dccp_msk(const struct sock *sk)
|
|||
return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock;
|
||||
}
|
||||
|
||||
static inline int dccp_service_not_initialized(const struct sock *sk)
|
||||
{
|
||||
return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE;
|
||||
}
|
||||
|
||||
static inline const char *dccp_role(const struct sock *sk)
|
||||
{
|
||||
switch (dccp_sk(sk)->dccps_role) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue