LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-27-2015, 07:51 PM   #16
krkrajeshkannan
LQ Newbie
 
Registered: Feb 2015
Posts: 7

Rep: Reputation: Disabled
ref #15 patch p0 < bgp_ns234.patch


Sir,

I proceeded...

1) I extracted the ns-allinone-2.34.tar.gz file
2) Edited "otcl-1.13/Makefile" line 16, from
SHLIB_LD= @SHLIB_LD@
to :
SHLIB_LD= gcc -shared as directed..
3) bsnl@bsnl-HCL-Notebook:~/Desktop/ns-allinone-2.34$ patch p0 < bgp_ns234.patch

This is what happened..

patching file p0
The next patch would create the file p0,
which already exists! Assume -R? [n] y
patching file p0
Hunk #1 FAILED at 1.
File p0 is not empty after patch, as expected
1 out of 1 hunk FAILED -- saving rejects to file p0.rej
The next patch would create the file p0,
which already exists! Assume -R? [n]

Contents of p0
----------------------
Code:
/*
 * Copyright (c) 2003 Communication Networks Lab, Simon Fraser University.
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * Authors: Tony Dongliang Feng <tdfeng@cs.sfu.ca>, Brian J. Premore.
 *
 */

#include "adjribin.h"

  // ----- constructor AdjRIBIn -------------------------------------------- //
  /**
   * Constructs an element of Adj-RIBs-In with a reference to the local BGP
   * protocol agent and the peer associated with it.
   *
   * @param b   The local BGP protocol agent.
   * @param pe  The peer with which this Adj-RIB-In is associated.
   */
AdjRIBIn::AdjRIBIn(PeerEntry *pe, rtProtoBGP *b):RIBElement(b){
  peer = pe;
}

AdjRIBIn::~AdjRIBIn() {}

  // ----- AdjRIBIn::add ---------------------------------------------------- //
  /**
   * Adds route information.  If route information with the same NLRI already
   * exists, then the add fails and the pre-existing information is returned.
   *
   * @param info  The route information to add.
   * @return pre-existing route information, if any
   */
RouteInfo * AdjRIBIn::add(RouteInfo * info) {
    RouteInfo * ri = RIBElement::add(info);
    if (ri != NULL) {
      printf( "adding routing to AdjRIBIn failed! \n");
    }
    return ri;
}

  // ----- AdjRIBIn::replace ------------------------------------------------ //
  /**
   * Adds route information, replacing any pre-existing information with the
   * same NLRI.
   *
   * @param info  The route information to add.
   * @return the pre-existing route information, or null if there was none
   */
RouteInfo * AdjRIBIn::replace(RouteInfo *info) {
    RouteInfo *ri = RIBElement::replace(info);    
    return ri;
}

  // ----- AdjRIBIn::remove ------------------------------------------------- //
  /**
   * Removes the route information corresponding to the given route
   * destination.
   *
   * @param ipa  The destination of the route information to remove.
   * @return the removed route information
   */
RouteInfo * AdjRIBIn::remove(IPaddress * ipa) {
    RouteInfo * ri = RIBElement::remove(ipa);
    // if (ri == NULL) {
    //   printf( "The route being removed is not in AdjRIBIn! \n");
    // }
    return ri;
}

contents of p0.rej

========================
Code:
--- adjribin.h	2008-08-01 04:45:34.000000000 +0200
+++ adjribin.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2003 Communication Networks Lab, Simon Fraser University.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * Authors: Tony Dongliang Feng <tdfeng@cs.sfu.ca>, Brian J. Premore.
- *
- */
-
-#ifndef ADJRIBIN_H
-#define ADJRIBIN_H
-
-#include "ribelement.h"
- 
-class PeerEntry;
-class rtProtoBGP; 
-
-/**
- * One element of the Adj-RIBs-In section of BGP's Routing Information Base.
- */
-class AdjRIBIn : public RIBElement {
-public:
-	AdjRIBIn(PeerEntry *pe, rtProtoBGP *b);
-	~AdjRIBIn();
-  RouteInfo * add(RouteInfo * info);
-  RouteInfo * replace(RouteInfo *info);
-  RouteInfo * remove(IPaddress *ipa);
-  
-public:
- /** The peer with whom this element of Adj-RIB-In is associated. */
-  PeerEntry * peer;
-};
-
-#endif
===============================================

Please help...

Last edited by krkrajeshkannan; 02-28-2015 at 05:03 AM. Reason: Code tags updated
 
Old 02-28-2015, 04:16 AM   #17
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← ref. #16.

'CODE tags' must be used, when showing code or error output in a post.
. http://www.linuxquestions.org/questi....php?do=bbcode
. http://www.linuxquestions.org/questi...gs-4175464257/

Sorry for typo´s : The patch command is 'patch -p0 < [destination].
Not 'patch p0 ' : The hyphen ( - ) is missing.
http://linux.die.net/man/1/patch
→ patch -p[num] < patchfile


Please edit post #16 : You can delete the dummy "p0" code.
There is no real file p0. Is a result of a choked patch command.
Editing : The 'Edit' button.


-
 
Old 02-28-2015, 05:10 AM   #18
krkrajeshkannan
LQ Newbie
 
Registered: Feb 2015
Posts: 7

Rep: Reputation: Disabled
ref #10 $ export CC=gcc-4.4 CXX=g++-4.4 && ./install

Dear Sir...

Sorry for the typo error..

I have succeed in applying patches otcl_ns234_gcc-4.4.patch and bgp_ns234.patch

when trying to execute "~/Desktop/ns-allinone-2.34$ export CC=gcc-4.4 CXX=g++-4.4 && ./install" command the following error appears, kindly advice..

Error:
Code:
ne-2.34/include -I/home/bsnl/Desktop/ns-allinone-2.34/include -I/home/bsnl/Desktop/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o bgp/Util/ipaddress.o bgp/Util/ipaddress.cc
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::bin2str(boolVector)’:
bgp/Util/ipaddress.cc:295: error: ‘sprintf’ was not declared in this scope
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::val2str()’:
bgp/Util/ipaddress.cc:667: error: ‘sprintf’ was not declared in this scope
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::toString()’:
bgp/Util/ipaddress.cc:698: error: ‘sprintf’ was not declared in this scope
make: *** [bgp/Util/ipaddress.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
Please help me to resolve..
 
Old 02-28-2015, 05:50 AM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← ref. #18.

OK, seems the old BGP code doesn't like g++-4.4 (Any more?).

You can install the g++41 compiler : gcc version 4.1.2 .
gcc41-compat "1204" https://docs.google.com/open?id=0B7S...lNURldUenRyb3c
g++41-compat https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4
$ sudo dpkg -i gcc41-compat-4.1.2.ubu1204_i386.deb g++41-compat-4.1.2_i386.deb
$ cd /usr/bin/
$ sudo ln -s ../gcc41/bin/gcc41
$ sudo ln -s ../gcc41/bin/g++41 && exit

$ cd ns-allinone-2.34/
$ export CC=gcc-4.4 CXX=g++41 && ./install
Etc. etc.


-
 
Old 03-11-2015, 05:50 AM   #20
krkrajeshkannan
LQ Newbie
 
Registered: Feb 2015
Posts: 7

Rep: Reputation: Disabled
Installing ns-2.34-bgp_2.0_fld_mrai.tar.gz

reference post #11 & reference post #12

Dear Sir..

Thanks for your support..

1) After installation of ns-2.34 and ns-2.34bgp (reference: http://www2.ensc.sfu.ca/~ljilja/cnl/...-2.34-BGP.html)

2)I am trying to install ns-2.34-bgp-rfd-mrai.tar.gz and ns-2.34-bgp_2.0_fld_mrai.tar.gz
(REFERENCE link: http://www2.ensc.sfu.ca/~ljilja/cnl/...P_rfd_fld.html)

While executing the

make command in the last step, i am getting this error..


Code:
/Desktop/ns-fld/ns-allinone-2.34/lib -ltk8.4 -L/home/bsnl/Desktop/ns-fld/ns-allinone-2.34/lib -ltcl8.4 -lXext -lX11 -lnsl -ldl -lm -lm 
bgp/peer-entry.o: In function `PeerEntry::PeerEntry()':
peer-entry.cc:(.text+0x161b): undefined reference to `CRule::CRule(bool)'
peer-entry.cc:(.text+0x166a): undefined reference to `CRule::CRule(bool)'
peer-entry.cc:(.text+0x17c0): undefined reference to `CRule::~CRule()'
peer-entry.cc:(.text+0x17df): undefined reference to `CRule::~CRule()'
bgp/peer-entry.o: In function `PeerEntry::PeerEntry()':
peer-entry.cc:(.text+0x1ac3): undefined reference to `CRule::CRule(bool)'
peer-entry.cc:(.text+0x1b12): undefined reference to `CRule::CRule(bool)'
peer-entry.cc:(.text+0x1c68): undefined reference to `CRule::~CRule()'
peer-entry.cc:(.text+0x1c87): undefined reference to `CRule::~CRule()'
bgp/peer-entry.o: In function `PeerEntry::~PeerEntry()':
peer-entry.cc:(.text._ZN9PeerEntryD0Ev[PeerEntry::~PeerEntry()]+0x31): undefined reference to `CRule::~CRule()'
peer-entry.cc:(.text._ZN9PeerEntryD0Ev[PeerEntry::~PeerEntry()]+0x4a): undefined reference to `CRule::~CRule()'
peer-entry.cc:(.text._ZN9PeerEntryD0Ev[PeerEntry::~PeerEntry()]+0x6b): undefined reference to `CRule::~CRule()'
bgp/peer-entry.o:peer-entry.cc:(.text._ZN9PeerEntryD1Ev[PeerEntry::~PeerEntry()]+0x31): more undefined references to `CRule::~CRule()' follow
bgp/rtProtoBGP.o: In function `rtProtoBGP::config_filter()':
rtProtoBGP.cc:(.text+0x29d): undefined reference to `CPrefixList::CPrefixList(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, int)'
rtProtoBGP.cc:(.text+0x315): undefined reference to `CPrefixList::~CPrefixList()'
rtProtoBGP.cc:(.text+0x32c): undefined reference to `CPrefixList::~CPrefixList()'
bgp/rtProtoBGP.o: In function `rtProtoBGP::advertisable(RouteInfo*, PeerEntry*)':
rtProtoBGP.cc:(.text+0x4a5): undefined reference to `CRule::applyTo(Route&)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::decision_process_2(std::vector<RouteInfo*, std::allocator<RouteInfo*> >, bool)':
rtProtoBGP.cc:(.text+0x772): undefined reference to `DampInfo::update(bool, RouteInfo*)'
rtProtoBGP.cc:(.text+0x887): undefined reference to `DampInfo::update(bool, RouteInfo*)'
rtProtoBGP.cc:(.text+0xac9): undefined reference to `DampInfo::update(bool, RouteInfo*)'
rtProtoBGP.cc:(.text+0xb85): undefined reference to `DampInfo::DampInfo(RouteInfo*, rtProtoBGP*, double, double, double, double, double, double)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::decision_process_1(std::vector<RouteInfo*, std::allocator<RouteInfo*> >)':
rtProtoBGP.cc:(.text+0xfc9): undefined reference to `CRule::applyTo(Route&)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::handle_update(UpdateMessage*)':
rtProtoBGP.cc:(.text+0x43e2): undefined reference to `vecRoutes::add(Route*)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::conf()':
rtProtoBGP.cc:(.text+0x77d9): undefined reference to `reusableMRAItimer::reusableMRAItimer(rtProtoBGP*)'
rtProtoBGP.cc:(.text+0x78ca): undefined reference to `reusableMRAItimer::set_offset(float)'
rtProtoBGP.cc:(.text+0x7e37): undefined reference to `CRule::CRule(bool)'
rtProtoBGP.cc:(.text+0x7e54): undefined reference to `CRule::CRule(bool)'
rtProtoBGP.cc:(.text+0x7ea6): undefined reference to `CRule::~CRule()'
rtProtoBGP.cc:(.text+0x7ec3): undefined reference to `CRule::~CRule()'
rtProtoBGP.cc:(.text+0x7ef4): undefined reference to `CRule::CRule(bool)'
rtProtoBGP.cc:(.text+0x7f11): undefined reference to `CRule::CRule(bool)'
rtProtoBGP.cc:(.text+0x7f63): undefined reference to `CRule::~CRule()'
rtProtoBGP.cc:(.text+0x7f80): undefined reference to `CRule::~CRule()'
bgp/rtProtoBGP.o: In function `rtProtoBGP::show_damping_info()':
rtProtoBGP.cc:(.text+0x89e2): undefined reference to `DampInfo::toString()'
bgp/rtProtoBGP.o: In function `rtProtoBGP::rtProtoBGP()':
rtProtoBGP.cc:(.text+0xabec): undefined reference to `CPUTimer::CPUTimer(rtProtoBGP*)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::rtProtoBGP()':
rtProtoBGP.cc:(.text+0xb3da): undefined reference to `CPUTimer::CPUTimer(rtProtoBGP*)'
bgp/rtProtoBGP.o: In function `void std::_Destroy<CAtomicPredicate>(CAtomicPredicate*)':
rtProtoBGP.cc:(.text._ZSt8_DestroyI16CAtomicPredicateEvPT_[void std::_Destroy<CAtomicPredicate>(CAtomicPredicate*)]+0xd): undefined reference to `CAtomicPredicate::~CAtomicPredicate()'
bgp/rtProtoBGP.o: In function `void std::_Destroy<CAtomicAction>(CAtomicAction*)':
rtProtoBGP.cc:(.text._ZSt8_DestroyI13CAtomicActionEvPT_[void std::_Destroy<CAtomicAction>(CAtomicAction*)]+0xd): undefined reference to `CAtomicAction::~CAtomicAction()'
bgp/rtProtoBGP.o: In function `CClause::CClause(CClause const&)':
rtProtoBGP.cc:(.text._ZN7CClauseC1ERKS_[CClause::CClause(CClause const&)]+0x43): undefined reference to `CPredicate::~CPredicate()'
bgp/rtProtoBGP.o: In function `void std::_Destroy<CClause>(CClause*)':
rtProtoBGP.cc:(.text._ZSt8_DestroyI7CClauseEvPT_[void std::_Destroy<CClause>(CClause*)]+0xd): undefined reference to `CClause::~CClause()'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Sir, kindly help to resolve. i am awaiting for your guidance...

Last edited by krkrajeshkannan; 03-19-2015 at 01:12 AM. Reason: Typo error
 
  


Reply

Tags
bgp, bgp-ns2, ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ns-allinone-2.31 make: *** [tools/random.o] Error 127 bilalPolito Linux - Newbie 8 02-05-2015 08:25 AM
Multipath-tools occur an error with Ubuntu server11.10 garasgaras Linux - Server 0 11-15-2011 02:06 AM
Unable to compile C++ programs.make:g++ command not found error.Error 127 PrathuD Programming 3 03-16-2009 12:44 PM
module-init-tools-3.1 error 127 Homer Glemkin Linux - Software 0 11-23-2004 11:11 AM
DSN: Data format error & relay=[127.0.0.1] [127.0.0.1] calmbomb Linux - Software 0 11-07-2004 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration