anchor.diff:  traffic_ping_pong_small_sendmsg_and_recvmsg_tcp6(doc) ->
       [];
   traffic_ping_pong_small_sendmsg_and_recvmsg_tcp6(_Config) when is_list(_Config) ->
  +    Msg = l2b(?PP_SMALL),
  +    Num = 100000,
       tc_try(traffic_ping_pong_small_sendmsg_and_recvmsg_tcp6,
              fun() ->
                      not_yet_implemented(),
                      ?TT(?SECS(20)),
  -                   Send = fun(Sock, Data) ->
  -                                  MsgHdr = #{iov => [Data]},
  -                                  socket:sendmsg(Sock, MsgHdr)
  -                          end,
  -                   Recv = fun(Sock, Sz)   -> 
  -                                  case socket:recvmsg(Sock, Sz, 0) of
  -                                      {ok, #{addr  := undefined,
  -                                             iov   := [Data]}} ->
  -                                          {ok, Data};
  -                                      {error, _} = ERROR ->
  -                                          ERROR
  -                                  end
  -                          end,
  -                   InitState = #{domain => inet6,
  -                                 send   => Send, % Send function
  -                                 recv   => Recv  % Receive function
  -                                },
  -                   ok = traffic_ping_pong_small_send_and_receive_tcp(InitState)
  +                   InitState = #{domain => inet,
  +                                 msg    => Msg,
  +                                 num    => Num},
  +                   ok = traffic_ping_pong_sendmsg_and_recvmsg_tcp(InitState)
              end).
   
   
  
positive.code: traffic_ping_pong_small_send_and_recv_tcp4(doc) ->
      [];
  traffic_ping_pong_small_send_and_recv_tcp4(_Config) when is_list(_Config) ->
      tc_try(traffic_ping_pong_small_send_and_recv_tcp4,
             fun() ->
                     ?TT(?SECS(15)),
                     Send = fun(Sock, Data) -> socket:send(Sock, Data) end,
                     %% Recv = fun(Sock)       -> socket:recv(Sock, 0, 5000) end,
                     Recv = fun(Sock, Sz)   -> socket:recv(Sock, Sz) end,
                     InitState = #{domain => inet,
                                   send   => Send, % Send function
                                   recv   => Recv  % Receive function
                                  },
                     ok = traffic_ping_pong_small_send_and_receive_tcp(InitState)
             end).
  
  
  
negative.code: traffic_ping_pong_large_sendmsg_and_recvmsg_tcp6(doc) ->
      [];
  traffic_ping_pong_large_sendmsg_and_recvmsg_tcp6(_Config) when is_list(_Config) ->
      Msg = l2b(?PP_LARGE),
      Num = 1000,
      tc_try(traffic_ping_pong_large_sendmsg_and_recvmsg_tcp6,
             fun() ->
                     not_yet_implemented(),
                     ?TT(?SECS(30)),
                     InitState = #{domain => inet6,
                                   msg    => Msg,
                                   num    => Num},
                     ok = traffic_ping_pong_sendmsg_and_recvmsg_tcp(InitState)
             end).
  
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  traffic_ping_pong_send_and_recv_tcp(InitState) ->
      Send = fun(Sock, Data) -> socket:send(Sock, Data) end,
      Recv = fun(Sock, Sz)   -> socket:recv(Sock, Sz) end,
      InitState2 = InitState#{send => Send, % Send function
                              recv => Recv  % Receive function
                             },
      traffic_ping_pong_send_and_receive_tcp(InitState2).
  
  traffic_ping_pong_sendmsg_and_recvmsg_tcp(InitState) ->
      Send = fun(Sock, Data) when is_binary(Data) ->
                     MsgHdr = #{iov => [Data]},
                     socket:sendmsg(Sock, MsgHdr);
                (Sock, Data) when is_list(Data) -> %% We assume iovec...
                     MsgHdr = #{iov => Data},
                     socket:sendmsg(Sock, MsgHdr)
             end,
      Recv = fun(Sock, Sz)   -> 
                     case socket:recvmsg(Sock, Sz, 0) of
                         {ok, #{addr  := undefined,
                                iov   := [Data]}} ->
                             {ok, Data};
                         {error, _} = ERROR ->
                             ERROR
                     end
             end,
      InitState2 = InitState#{send => Send, % Send function
                              recv => Recv  % Receive function
                             },
      traffic_ping_pong_send_and_receive_tcp(InitState2).
  
  
  traffic_ping_pong_send_and_receive_tcp(#{msg := Msg} = InitState) ->
      Fun = fun(Sock) -> 
                    {ok, RcvSz} = socket:getopt(Sock, socket, rcvbuf),
                    if (RcvSz < size(Msg)) ->
                            ok = socket:setopt(Sock, socket, rcvbuf, 1024+size(Msg));
  