aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dccp.h
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2006-09-22 04:33:58 -0400
committerArnaldo Carvalho de Melo <acme@mandriva.com>2006-09-24 16:49:26 -0400
commit00e4d116a7ef94eb910be037912b0b2fc09f608b (patch)
tree81e8a52c7529691b3c07605613da65cae80f41c9 /include/linux/dccp.h
parent1ab9dd0902df4f4ff56fbf672220549090ab28ba (diff)
[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>
Diffstat (limited to 'include/linux/dccp.h')
-rw-r--r--include/linux/dccp.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 2d7671c92c0b..29f9291e45c0 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -404,6 +404,7 @@ struct dccp_service_list {
404}; 404};
405 405
406#define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1) 406#define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1)
407#define DCCP_SERVICE_CODE_IS_ABSENT 0
407 408
408static inline int dccp_list_has_service(const struct dccp_service_list *sl, 409static inline int dccp_list_has_service(const struct dccp_service_list *sl,
409 const __be32 service) 410 const __be32 service)
@@ -484,11 +485,6 @@ static inline struct dccp_minisock *dccp_msk(const struct sock *sk)
484 return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock; 485 return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock;
485} 486}
486 487
487static inline int dccp_service_not_initialized(const struct sock *sk)
488{
489 return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE;
490}
491
492static inline const char *dccp_role(const struct sock *sk) 488static inline const char *dccp_role(const struct sock *sk)
493{ 489{
494 switch (dccp_sk(sk)->dccps_role) { 490 switch (dccp_sk(sk)->dccps_role) {