OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007 Emmanuelle Laprise, INRIA | 3 * Copyright (c) 2007 Emmanuelle Laprise, INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 PacketSocket::Bind (void) | 106 PacketSocket::Bind (void) |
107 { | 107 { |
108 NS_LOG_FUNCTION (this); | 108 NS_LOG_FUNCTION (this); |
109 PacketSocketAddress address; | 109 PacketSocketAddress address; |
110 address.SetProtocol (0); | 110 address.SetProtocol (0); |
111 address.SetAllDevices (); | 111 address.SetAllDevices (); |
112 return DoBind (address); | 112 return DoBind (address); |
113 } | 113 } |
114 | 114 |
115 int | 115 int |
| 116 PacketSocket::Bind6 (void) |
| 117 { |
| 118 return(Bind()); |
| 119 } |
| 120 |
| 121 int |
116 PacketSocket::Bind (const Address &address) | 122 PacketSocket::Bind (const Address &address) |
117 {· | 123 {· |
118 NS_LOG_FUNCTION (this << address); | 124 NS_LOG_FUNCTION (this << address); |
119 if (!PacketSocketAddress::IsMatchingType (address)) | 125 if (!PacketSocketAddress::IsMatchingType (address)) |
120 { | 126 { |
121 m_errno = ERROR_INVAL; | 127 m_errno = ERROR_INVAL; |
122 return -1; | 128 return -1; |
123 } | 129 } |
124 PacketSocketAddress ad = PacketSocketAddress::ConvertFrom (address); | 130 PacketSocketAddress ad = PacketSocketAddress::ConvertFrom (address); |
125 return DoBind (ad); | 131 return DoBind (ad); |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 return true; | 488 return true; |
483 } | 489 } |
484 | 490 |
485 bool | 491 bool |
486 PacketSocket::GetAllowBroadcast () const | 492 PacketSocket::GetAllowBroadcast () const |
487 { | 493 { |
488 return false; | 494 return false; |
489 } | 495 } |
490 | 496 |
491 } // namespace ns3 | 497 } // namespace ns3 |
OLD | NEW |