Left: | ||
Right: |
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) 2011 Yufei Cheng | 3 * Copyright (c) 2011 Yufei Cheng |
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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software | 15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Yufei Cheng <yfcheng@ittc.ku.edu> | 18 * Author: Yufei Cheng <yfcheng@ittc.ku.edu> |
19 * | 19 * |
20 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director | 20 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director |
21 * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets | 21 * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets |
22 * Information and Telecommunication Technology Center (ITTC) | 22 * Information and Telecommunication Technology Center (ITTC) |
23 * and Department of Electrical Engineering and Computer Science | 23 * and Department of Electrical Engineering and Computer Science |
24 * The University of Kansas Lawrence, KS USA. | 24 * The University of Kansas Lawrence, KS USA. |
25 * | 25 * |
26 * Work supported in part by NSF FIND (Future Internet Design) Program | 26 * Work supported in part by NSF FIND (Future Internet Design) Program |
27 * under grant CNS-0626918 (Postmodern Internet Architecture), | 27 * under grant CNS-0626918 (Postmodern Internet Architecture), |
28 * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimenta tion on GENI), | 28 * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimenta tion on GENI), |
29 * US Department of Defense (DoD), and ITTC at The University of Kansas. | 29 * US Department of Defense (DoD), and ITTC at The University of Kansas. |
30 * | |
31 * Author of LEAR modification: Tomasz Seweryn <tomasz.seweryn7@gmail.com> | |
30 */ | 32 */ |
31 | 33 |
32 #ifndef DSR_OPTION_H | 34 #ifndef DSR_OPTION_H |
33 #define DSR_OPTION_H | 35 #define DSR_OPTION_H |
34 | 36 |
35 #include <map> | 37 #include <map> |
36 #include <list> | 38 #include <list> |
37 | 39 |
38 #include "ns3/buffer.h" | 40 #include "ns3/buffer.h" |
39 #include "ns3/packet.h" | 41 #include "ns3/packet.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 * \brief Constructor. | 336 * \brief Constructor. |
335 */ | 337 */ |
336 DsrOptionRreq (); | 338 DsrOptionRreq (); |
337 /** | 339 /** |
338 * \brief Destructor. | 340 * \brief Destructor. |
339 */ | 341 */ |
340 virtual ~DsrOptionRreq (); | 342 virtual ~DsrOptionRreq (); |
341 | 343 |
342 virtual uint8_t GetOptionNumber () const; | 344 virtual uint8_t GetOptionNumber () const; |
343 virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv 4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bo ol& isPromisc, Ipv4Address promiscSource); | 345 virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv 4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bo ol& isPromisc, Ipv4Address promiscSource); |
346 /** | |
347 * \brief Set LEAR flag | |
348 */ | |
349 void SetLear (bool isLearActive); | |
344 | 350 |
345 private: | 351 private: |
346 /** | 352 /** |
347 * \brief The route cache. | 353 * \brief The route cache. |
348 */ | 354 */ |
349 Ptr<dsr::RouteCache> m_routeCache; | 355 Ptr<dsr::RouteCache> m_routeCache; |
350 /** | 356 /** |
351 * \brief The ipv4. | 357 * \brief The ipv4. |
352 */ | 358 */ |
353 Ptr<Ipv4> m_ipv4; | 359 Ptr<Ipv4> m_ipv4; |
360 /** | |
361 * \brief LEAR option determining if LEAR version of DSR is active | |
362 */ | |
363 bool m_isLearActive; | |
354 }; | 364 }; |
355 | 365 |
356 /** | 366 /** |
357 * \class DsrOptionRrep | 367 * \class DsrOptionRrep |
358 * \brief Dsr Option Route Reply | 368 * \brief Dsr Option Route Reply |
359 */ | 369 */ |
360 class DsrOptionRrep : public DsrOptions | 370 class DsrOptionRrep : public DsrOptions |
361 { | 371 { |
362 public: | 372 public: |
363 /** | 373 /** |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
532 private: | 542 private: |
533 /** | 543 /** |
534 * \brief The route cache. | 544 * \brief The route cache. |
535 */ | 545 */ |
536 Ptr<dsr::RouteCache> m_routeCache; | 546 Ptr<dsr::RouteCache> m_routeCache; |
537 /** | 547 /** |
538 * \brief The ipv4 layer 3. | 548 * \brief The ipv4 layer 3. |
539 */ | 549 */ |
540 Ptr<Ipv4> m_ipv4; | 550 Ptr<Ipv4> m_ipv4; |
541 }; | 551 }; |
552 | |
553 /** | |
554 * \class DsrOptionDropRReq | |
555 * \brief Dsr Option Drop Route Request | |
556 */ | |
557 class DsrOptionDropRReq : public DsrOptions | |
558 { | |
559 | |
560 public: | |
561 static const uint8_t OPT_NUMBER = 200; | |
562 | |
563 static TypeId GetTypeId (); | |
564 | |
565 virtual TypeId GetInstanceTypeId () const; | |
566 | |
567 DsrOptionDropRReq (); | |
Tom Henderson
2014/08/31 23:55:56
missing some doxygen on non-virtual methods?
tomasz.seweryn7
2014/09/04 20:12:17
I will correct it for my definitions and for the r
| |
568 | |
569 virtual ~DsrOptionDropRReq (); | |
570 | |
571 virtual uint8_t GetOptionNumber () const; | |
572 | |
573 virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv 4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bo ol& isPromisc, Ipv4Address promiscSource); | |
574 | |
575 private: | |
576 /** | |
577 * \brief The route cache. | |
578 */ | |
579 Ptr<dsr::RouteCache> m_routeCache; | |
580 /** | |
581 * \brief The length of the packet. | |
582 */ | |
583 uint32_t m_length; | |
584 /** | |
585 * \brief The ip layer 3. | |
586 */ | |
587 Ptr<Ipv4> m_ipv4; | |
588 }; | |
589 | |
590 /** | |
591 * \class DsrOptionRCache | |
592 * \brief Dsr Option Route Cache | |
593 */ | |
594 class DsrOptionRCache : public DsrOptions | |
595 { | |
596 | |
597 public: | |
598 static const uint8_t OPT_NUMBER = 201; | |
599 | |
600 static TypeId GetTypeId (); | |
601 | |
602 virtual TypeId GetInstanceTypeId () const; | |
603 | |
604 DsrOptionRCache (); | |
605 | |
606 virtual ~DsrOptionRCache (); | |
607 | |
608 virtual uint8_t GetOptionNumber () const; | |
609 | |
610 virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv 4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bo ol& isPromisc, Ipv4Address promiscSource); | |
611 | |
612 private: | |
613 /** | |
614 * \brief The route cache. | |
615 */ | |
616 Ptr<dsr::RouteCache> m_routeCache; | |
617 /** | |
618 * \brief The length of the packet. | |
619 */ | |
620 uint32_t m_length; | |
621 /** | |
622 * \brief The ip layer 3. | |
623 */ | |
624 Ptr<Ipv4> m_ipv4; | |
625 }; | |
626 | |
627 /** | |
628 * \class DsrOptionDropRCache | |
629 * \brief Dsr Option Drop Route Cache | |
630 */ | |
631 class DsrOptionDropRCache : public DsrOptions | |
632 { | |
633 | |
634 public: | |
635 static const uint8_t OPT_NUMBER = 202; | |
636 | |
637 static TypeId GetTypeId (); | |
638 | |
639 virtual TypeId GetInstanceTypeId () const; | |
640 | |
641 DsrOptionDropRCache (); | |
642 | |
643 virtual ~DsrOptionDropRCache (); | |
644 | |
645 virtual uint8_t GetOptionNumber () const; | |
646 | |
647 virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv 4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bo ol& isPromisc, Ipv4Address promiscSource); | |
648 | |
649 private: | |
650 /** | |
651 * \brief The route cache. | |
652 */ | |
653 Ptr<dsr::RouteCache> m_routeCache; | |
654 /** | |
655 * \brief The length of the packet. | |
656 */ | |
657 uint32_t m_length; | |
658 /** | |
659 * \brief The ip layer 3. | |
660 */ | |
661 Ptr<Ipv4> m_ipv4; | |
662 }; | |
663 | |
664 /** | |
665 * \class DsrOptionCancelRCache | |
666 * \brief Dsr Option Cancel Route Cache | |
667 */ | |
668 class DsrOptionCancelRCache : public DsrOptions | |
669 { | |
670 | |
671 public: | |
672 static const uint8_t OPT_NUMBER = 203; | |
673 | |
674 static TypeId GetTypeId (); | |
675 | |
676 virtual TypeId GetInstanceTypeId () const; | |
677 | |
678 DsrOptionCancelRCache (); | |
679 | |
680 virtual ~DsrOptionCancelRCache (); | |
681 | |
682 virtual uint8_t GetOptionNumber () const; | |
683 | |
684 virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv 4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bo ol& isPromisc, Ipv4Address promiscSource); | |
685 | |
686 private: | |
687 /** | |
688 * \brief The route cache. | |
689 */ | |
690 Ptr<dsr::RouteCache> m_routeCache; | |
691 /** | |
692 * \brief The length of the packet. | |
693 */ | |
694 uint32_t m_length; | |
695 /** | |
696 * \brief The ip layer 3. | |
697 */ | |
698 Ptr<Ipv4> m_ipv4; | |
699 }; | |
700 | |
542 } // namespace dsr | 701 } // namespace dsr |
543 } // Namespace ns3 | 702 } // Namespace ns3 |
544 | 703 |
545 #endif | 704 #endif |
OLD | NEW |