1 /** @file
2 
3   A brief file description
4 
5   @section license License
6 
7   Licensed to the Apache Software Foundation (ASF) under one
8   or more contributor license agreements.  See the NOTICE file
9   distributed with this work for additional information
10   regarding copyright ownership.  The ASF licenses this file
11   to you under the Apache License, Version 2.0 (the
12   "License"); you may not use this file except in compliance
13   with the License.  You may obtain a copy of the License at
14 
15       http://www.apache.org/licenses/LICENSE-2.0
16 
17   Unless required by applicable law or agreed to in writing, software
18   distributed under the License is distributed on an "AS IS" BASIS,
19   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20   See the License for the specific language governing permissions and
21   limitations under the License.
22  */
23 
24 /****************************************************************************
25 
26   NetVConnection.cc
27 
28   This file implements an I/O Processor for network I/O.
29 
30 
31  ****************************************************************************/
32 
33 #include "P_Net.h"
34 #include "ts/apidefs.h"
35 
36 Action *
send_OOB(Continuation *,char *,int)37 NetVConnection::send_OOB(Continuation *, char *, int)
38 {
39   return ACTION_RESULT_DONE;
40 }
41 
42 void
cancel_OOB()43 NetVConnection::cancel_OOB()
44 {
45   return;
46 }
47 
48 std::string_view
get_proto_string() const49 NetVCOptions::get_proto_string() const
50 {
51   switch (ip_proto) {
52   case USE_TCP:
53     return IP_PROTO_TAG_TCP;
54   case USE_UDP:
55     return IP_PROTO_TAG_UDP;
56   default:
57     break;
58   }
59   return {};
60 }
61 
62 std::string_view
get_family_string() const63 NetVCOptions::get_family_string() const
64 {
65   switch (ip_family) {
66   case AF_INET:
67     return IP_PROTO_TAG_IPV4;
68   case AF_INET6:
69     return IP_PROTO_TAG_IPV6;
70   default:
71     break;
72   }
73   return {};
74 }
75