473,778 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I don't get it

Jo
class A {

public:

char text_a[100];

A() { *text_a=0; }
~A() {}
};
//-----------------------------------------------------------------------------
class B {

public:

char text_b[100];

B() { *text_b=0; }
~B() {}
};
//-----------------------------------------------------------------------------
class C : public A, public B {

public:

char text_c[100];

C() { *text_c=0; }
~C() {}
};
//-------------------------------------------------------------------------------
void test() {

B *bp1,*bp2;
C c,*cp1,*cp2,*cp 3;
void *p;

strcpy(c.text_a ,"hello a");
strcpy(c.text_b ,"hello b");
strcpy(c.text_c ,"hello c");
cp1=&c;
p=cp1;
bp1=cp1; // ok
bp2=(B*)p; // resulting bp2 is WRONG!
cp2=(C*)p; // ok
cp3=(C*)bp2; // resulting cp3 is WRONG! Which is logical because bp2
is already wrong.
}
//-----------------------------------------------------------------------------

So the hot spot is the bp2=(B*)p;

What's wrong with that???

I can imagine someone saying "p is not pointing to a B object".
But if you think about it, conceptually, it does, imho.

So is it more a technical matter of compiling this!?

Maybe i'm stupid and/or missing something essential about C++.

If so, please give me a link to where i can study this right.

Cheers,

Jo

Jun 18 '07
31 1927
Jo wrote:
>
Imho, if class C is derived from A and B, then C IS an A and a B at the
same time, conceptually.

But i'm understanding that there is a technical implementation problem
here.

I thought the compiler could figure that out, but i'm clearly over
estimating the compiler and/or C++.
The compiler can, indeed, figure out the relation between a C*, the
corresponding A*, and the corresponding B*. The problem is that you're
not dealing with a C*, but with a void*. The code tells the compiler
that p points to untyped data, and that it should treat the address of
that untyped data as the address of an object of type B. The compiler
did exactly what you told it to do. The only valid conversion you can
apply to that void* is to cast it back to the type of the original
pointer. (C*)p, as you've seen, works just fine. (B*)(C*)p would give
you the address of the B subobject.

--

-- Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com)
Author of "The Standard C++ Library Extensions: a Tutorial and
Reference." (www.petebecker.com/tr1book)
Jun 18 '07 #11
Jo wrote:
Imho, if class C is derived from A and B, then C IS an A and a B at the
same time, conceptually.

But i'm understanding that there is a technical implementation problem
here.
In the OP you tried to get a B* from a void*. A void pointer is everything
and nothing, the compiler cannot know what type of object it points to.
So avoid void*. Avoid c-style cast, too. With C++ style cast, the compiler
can warn you whats wrong using them.
I thought the compiler could figure that out, but i'm clearly over
estimating the compiler and/or C++.

Anyway, it's off topic to go deeper in this. Although that would be a
nice discussion.
When it's a language thing, it is on-topic.
>Perhaps you are expecting an ordinary cast to work like a
dynamic_cast ? When you write

bp2=(B*)p; // resulting bp2 is WRONG!

you are expecting the program to 'discover' that there a B object
hidden inside the object that p is pointing to?

If so google for dynamic_cast, or better still read a good book.


I understand that a dynamic_cast cannot do a base-to-derived conversion,
so that's not the solution here.
dynamic_cast can, and is exactly the right tool, to do base-to-derived
conversion. It's like static_cast with an explicit runtime type check.
So i'm still looking for the solution for this situation

class A {

public:
virtual long GetClassID() { return(' A'); }
};
[...]
class C : public class A, public class B {

public:
virtual long GetClassID() { return(' C'); }
};
foo1(C *cp) {
...
foo2(cp);
...
}

foo2(A *ap) {

if (ap->GetClassID== ' C') {
C *cp=(C*)ap; // IS THIS LEGAL and PORTABLE C++ ?
}
}
When you know that an A* points to a C object, you can static_cast it to a
C*. But why inventing your own RTTI? You can use typeid and dynamic_cast
instead.

--
Thomas
http://www.netmeister.org/news/learn2quote.html
Jun 18 '07 #12
Jo
John Harrison wrote:
>
>>If so google for dynamic_cast, or better still read a good book.

I understand that a dynamic_cast cannot do a base-to-derived
conversion, so that's not the solution here.


dynamic_cast does do base to derived conversion, that's it's main use.
Where are you getting your information?

I got that from http://www.cplusplus.com/doc/tutorial/typecasting.html

But i was just reading another webpage where they indeed use
base-to-derived dynamic casts...

Did i misunderstand the cplusplus page?

Anyway, i prefer not to use RTTI.

Jun 18 '07 #13
Jo
Pete Becker wrote:
Jo wrote:
>>
Imho, if class C is derived from A and B, then C IS an A and a B at
the same time, conceptually.

But i'm understanding that there is a technical implementation
problem here.

I thought the compiler could figure that out, but i'm clearly over
estimating the compiler and/or C++.

The compiler can, indeed, figure out the relation between a C*, the
corresponding A*, and the corresponding B*. The problem is that you're
not dealing with a C*, but with a void*. The code tells the compiler
that p points to untyped data, and that it should treat the address of
that untyped data as the address of an object of type B. The compiler
did exactly what you told it to do. The only valid conversion you can
apply to that void* is to cast it back to the type of the original
pointer. (C*)p, as you've seen, works just fine. (B*)(C*)p would give
you the address of the B subobject.

So the very problem was the void*, right?

So is all this correct then: (supposing the same class hierarchy as
before, where C is derived from A and B)

C *cp=new C;
B *bp=cp;
C *cp2=(C*)bp;
A *ap=(A*)bp;

Jun 18 '07 #14
Jo <jo*******@tele net.bewrote in
news:XV******** *************@p hobos.telenet-ops.be:
Andre Kostur wrote:
>>Jo <jo*******@tele net.bewrote in
news:be****** *************** @phobos.telenet-ops.be:
[snip example. Important point: There is a class C which inherits from A
& B. A & B are otherwise unrelated]
>>>So the hot spot is the bp2=(B*)p;

What's wrong with that???


Because you are casting a p back into a pointer type that it wasn't
originally. p was originally a C*. You need to cast it back into a
C* first.

In the real code, i don't know yet what the type is.
I first need to get a B pointer, then i can deduce the target class.

Do i understand it right that this problem would not occur if
if... ?
>>>I can imagine someone saying "p is not pointing to a B object".
But if you think about it, conceptually, it does, imho.


Nope. It may be pointing at an A obect.

That's technically speaking, not conceptually, imo.

If C is derived from A & B, then a C object IS an A and IS a B. At the
same time.
Sure... within the constraints of the language. Means you can pass a C
to something that takes an A, or to something that takes a B. But you
went and removed all type data from the object when it became a void*.
You need to get that pointer back onto the right track first.
But i understand that at a certain point we must transition from
concepts into practical technology.

What i mean is: in practice: p cannot point to both the A and B
instance at the same time, so you're right about that.

So that's where we come into the implementation specifics.
>>>So is it more a technical matter of compiling this!?

Maybe i'm stupid and/or missing something essential about C++.

If so, please give me a link to where i can study this right.


Standard says you can cast a pointer to object into a void*, but you
can only cast the void* back into the pointer type that it was
originally. Anything else is undefined behaviour.

<Implementati on-specific behaviour>
What's probably happening in your case is that the memory layout of
your object is A->B->C. So when you take your C* (which is
effectively also an A*, but is _not_ a B*...), hammer it into a void*,
and then re-form it as a B*, you are effectively casting an A* to a
B*. Since they're unrelated types, who knows what the operations on B
do to an A object.

So.. you should cast that void* to a C* first, then assign the C* to a
B* (no cast required). The compiler will know at that point that
you're upcasting and will adjust the pointer value accordingly.

</Implementation-specific behaviour>

Cfr above: i don't know that i should go to a C until i got an A
first, because the A class contains some class specific definitions.

Now do i understand it right that the problem comes from the fact that
i'm using a void* ?

Would this be legal then:

// quick recap: class C is derived from both class A and B

A *ap;
B *bp;
C c,*cp;

cp=&c;
ap=cp;
bp=(B*)ap;
Casting an A* into a B*. Bad. A & B are unrelated.
or the last line being

bp=static_cast< B*>(ap);

which is the same, right?
Nope. Compiler should complain about that since A and B are unrelated.
Jun 18 '07 #15
Jo <jo*******@tele net.bewrote in
news:fa******** *************@p hobos.telenet-ops.be:
John Harrison wrote:
>Jo wrote:
[snip]
>Perhaps you are expecting an ordinary cast to work like a
dynamic_cast ? When you write

bp2=(B*)p; // resulting bp2 is WRONG!

you are expecting the program to 'discover' that there a B object
hidden inside the object that p is pointing to?

If so google for dynamic_cast, or better still read a good book.


I understand that a dynamic_cast cannot do a base-to-derived
conversion, so that's not the solution here.
No, that's exactly what dynamic_cast is for, _if_ the pointer is pointing
to an object that actually is of the derived type.
And a static_cast doesn't seem to make any difference, because i'm
already doing static casts right, just in the 'old' way.

So i'm still looking for the solution for this situation

class A {

public:
virtual long GetClassID() { return(' A'); }
};
class B {

public:
// some class data & funx
};

class C : public class A, public class B {

public:
virtual long GetClassID() { return(' C'); }
};
foo1(C *cp) {
...
foo2(cp);
...
}

foo2(A *ap) {

if (ap->GetClassID== ' C') {
C *cp=(C*)ap; // IS THIS LEGAL and PORTABLE C++
?
}
}
In theory that would work... of course so would:

class A {
virtual ~A() {};
};

class B {
virtual ~B() {};
};

class C : public class A, public class B {
virtual ~C() {};

void cfn() {};
};

foo1(C *cp) {
fooA(cp);
}

fooA(A *ap) {
C * cp = dynamic_cast<C* >(ap);

if (cp != NULL) {
cp->cfn();
}
}

No "getclassid " function required. However, note that there's no mention
of B anywhere in there (other than the inheritance)... . so how does B
get involved in this question?
Jun 18 '07 #16
Jo
Thomas J. Gritzan wrote:
>Jo wrote:

>>Imho, if class C is derived from A and B, then C IS an A and a B at the
same time, conceptually.

But i'm understanding that there is a technical implementation problem
here.


In the OP you tried to get a B* from a void*. A void pointer is everything
and nothing, the compiler cannot know what type of object it points to.
OK, understood.
>So avoid void*. Avoid c-style cast, too. With C++ style cast, the compiler
can warn you whats wrong using them.
OK, will take this into account.
>>I thought the compiler could figure that out, but i'm clearly over
estimating the compiler and/or C++.

Anyway, it's off topic to go deeper in this. Although that would be a
nice discussion.


When it's a language thing, it is on-topic.
The point was: When C is derived from A and B, then C is an A and C is a
B at the same time.

I would have been surprised if C++/the compiler would not be able to do
the up/down casts in this family, even when multiple inheritance is into
play.

(i immediately thought of a system how this would be no problem)

For a moment, i thought John said that C is not a B. But i
misunderstood. Now i understand he said that the void* p is not pointing
to the B object (in the given example) which is right because it's a void*.

If the C++ compiler can figure out the A/B/C up/down casts, then of
course i keep on being a happy C++ -er.

I know all this is pure essential.
I'm a bit amazed/ashamed that i ran into this problem (i.e. using the
void*).
I didn't know that when using a void*, you explicitly abandon all type
info, except for the source type.
>>>Perhaps you are expecting an ordinary cast to work like a
dynamic_cast ? When you write

bp2=(B*)p; // resulting bp2 is WRONG!

you are expecting the program to 'discover' that there a B object
hidden inside the object that p is pointing to?

If so google for dynamic_cast, or better still read a good book.

I understand that a dynamic_cast cannot do a base-to-derived conversion,
so that's not the solution here.


dynamic_cast can, and is exactly the right tool, to do base-to-derived
conversion. It's like static_cast with an explicit runtime type check.
I understand.
>>So i'm still looking for the solution for this situation

class A {

public:
virtual long GetClassID() { return(' A'); }
};

[...]

>>class C : public class A, public class B {

public:
virtual long GetClassID() { return(' C'); }
};
foo1(C *cp) {
...
foo2(cp);
...
}

foo2(A *ap) {

if (ap->GetClassID== ' C') {
C *cp=(C*)ap; // IS THIS LEGAL and PORTABLE C++ ?
}
}


When you know that an A* points to a C object, you can static_cast it to a
C*. But why inventing your own RTTI? You can use typeid and dynamic_cast
instead.
It's indeed about having a 'little private' RTTI system.

I would like to not use RTTI because i heard about the overhead it brings.

Not sure if that is memory or cpu overhead, or both?

The application i'm working on is a multi-threaded realtime application
where part of the code runs at interrupt level.

And that code must be fast, and may not do any dynamic memory allocs!

So that's why i want to play it safe.

Jun 18 '07 #17
On 2007-06-18 22:17, Jo wrote:
John Harrison wrote:
>>
>>>If so google for dynamic_cast, or better still read a good book.

I understand that a dynamic_cast cannot do a base-to-derived
conversion, so that's not the solution here.


dynamic_cast does do base to derived conversion, that's it's main use.
Where are you getting your information?


I got that from http://www.cplusplus.com/doc/tutorial/typecasting.html

But i was just reading another webpage where they indeed use
base-to-derived dynamic casts...

Did i misunderstand the cplusplus page?
Yes, it seems to me like they perform a base to derived cast there
(second example), though their example are perhaps a bit more
complicated than needed.

--
Erik Wikström
Jun 18 '07 #18
Andre Kostur wrote:
>Jo <jo*******@tele net.bewrote in
news:XV******* **************@ phobos.telenet-ops.be:
>>Andre Kostur wrote:
>>>Jo <jo*******@tele net.bewrote in
news:be***** *************** *@phobos.telene t-ops.be:

[snip example. Important point: There is a class C which inherits from A
& B. A & B are otherwise unrelated]
I see.
>>>>So the hot spot is the bp2=(B*)p;

What's wrong with that???


Because you are casting a p back into a pointer type that it wasn't
originally . p was originally a C*. You need to cast it back into a
C* first.
In the real code, i don't know yet what the type is.
I first need to get a B pointer, then i can deduce the target class.

Do i understand it right that this problem would not occur if


if... ?
If i wouldn't use that void*
>>>>I can imagine someone saying "p is not pointing to a B object".
But if you think about it, conceptually, it does, imho.


Nope. It may be pointing at an A obect.
That's technically speaking, not conceptually, imo.

If C is derived from A & B, then a C object IS an A and IS a B. At the
same time.


Sure... within the constraints of the language. Means you can pass a C
to something that takes an A, or to something that takes a B. But you
went and removed all type data from the object when it became a void*.
You need to get that pointer back onto the right track first.
Yes, using the void* was the very error.
>>But i understand that at a certain point we must transition from
concepts into practical technology.

What i mean is: in practice: p cannot point to both the A and B
instance at the same time, so you're right about that.

So that's where we come into the implementation specifics.
>>>>So is it more a technical matter of compiling this!?

Maybe i'm stupid and/or missing something essential about C++.

If so, please give me a link to where i can study this right.


Standard says you can cast a pointer to object into a void*, but you
can only cast the void* back into the pointer type that it was
originally . Anything else is undefined behaviour.

<Implementat ion-specific behaviour>
What's probably happening in your case is that the memory layout of
your object is A->B->C. So when you take your C* (which is
effectivel y also an A*, but is _not_ a B*...), hammer it into a void*,
and then re-form it as a B*, you are effectively casting an A* to a
B*. Since they're unrelated types, who knows what the operations on B
do to an A object.

So.. you should cast that void* to a C* first, then assign the C* to a
B* (no cast required). The compiler will know at that point that
you're upcasting and will adjust the pointer value accordingly.

</Implementation-specific behaviour>
Cfr above: i don't know that i should go to a C until i got an A
first, because the A class contains some class specific definitions.

Now do i understand it right that the problem comes from the fact that
i'm using a void* ?

Would this be legal then:

// quick recap: class C is derived from both class A and B

A *ap;
B *bp;
C c,*cp;

cp=&c;
ap=cp;
bp=(B*)ap;


Casting an A* into a B*. Bad. A & B are unrelated.
Indeed, i fully understand now.

And this also is a nice example why using static_cast is better because

bp=(B*)ap; // just works
bp=static_cast< B*>(ap); // compiler error which is a good thing
>>or the last line being

bp=static_cas t<B*>(ap);

which is the same, right?


Nope. Compiler should complain about that since A and B are unrelated.

--

http://www.mutools.com

Jun 18 '07 #19
Jo

Andre Kostur wrote:
>Jo <jo*******@tele net.bewrote in
news:fa******* **************@ phobos.telenet-ops.be:
>>John Harrison wrote:
>>>Jo wrote:

[snip]
>>>Perhaps you are expecting an ordinary cast to work like a
dynamic_cast ? When you write

bp2=(B*)p; // resulting bp2 is WRONG!

you are expecting the program to 'discover' that there a B object
hidden inside the object that p is pointing to?

If so google for dynamic_cast, or better still read a good book.

I understand that a dynamic_cast cannot do a base-to-derived
conversion, so that's not the solution here.


No, that's exactly what dynamic_cast is for, _if_ the pointer is pointing
to an object that actually is of the derived type.
>>And a static_cast doesn't seem to make any difference, because i'm
already doing static casts right, just in the 'old' way.

So i'm still looking for the solution for this situation

class A {

public:
virtual long GetClassID() { return(' A'); }
};
class B {

public:
// some class data & funx
};

class C : public class A, public class B {

public:
virtual long GetClassID() { return(' C'); }
};
foo1(C *cp) {
...
foo2(cp);
...
}

foo2(A *ap) {

if (ap->GetClassID== ' C') {
C *cp=(C*)ap; // IS THIS LEGAL and PORTABLE C++
?
}
}


In theory that would work... of course so would:

class A {
virtual ~A() {};
};

class B {
virtual ~B() {};
};

class C : public class A, public class B {
virtual ~C() {};

void cfn() {};
};

foo1(C *cp) {
fooA(cp);
}

fooA(A *ap) {
C * cp = dynamic_cast<C* >(ap);

if (cp != NULL) {
cp->cfn();
}
}

No "getclassid " function required.
Indeed.

But i prefer not to use RTTI for the reasons mentioned in the earlier post.
>However, note that there's no mention
of B anywhere in there (other than the inheritance)... . so how does B
get involved in this question?
I guess i was confused:

Because i ran into the casting problem (due to the use of the void*), i
started thinking that it had to do with the multiple inheritance...

I really didn't know that using a void* abandons all the class relation
info. (and that after all these years of programming, damn damn damn)

Thanks a lot for your help!

A dummy got a bit less dummy :)

Jun 18 '07 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
17775
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which will also make this a more balanced
16
2423
by: mike420 | last post by:
Tayss wrote: > > app = wxPySimpleApp() > frame = MainWindow(None, -1, "A window") > frame.Show(True) > app.MainLoop() > Why do you need a macro for that? Why don't you just write
12
4055
by: AFN | last post by:
I am running the code below to generate XML from a data table. But some fields in the data table are Null for every record. Suppose field5 has a null database value. I would expect to see: <field5></field5> or <field5 /> but instead it doesn't even show the field at all for those records where field5 is Null! Instead it just shows: <field4>Whatever</field4>
3
3051
by: Douglas Buchanan | last post by:
Buttons don't work if form is opened on startup A2k If 'frmMain' is set to open by default at startup none of the buttons work. If 'frmMain' is opened from the database window then all the buttons work. The form's name ('frmMain') is selected from in the Startup dialog box.
28
2505
by: DFS | last post by:
I'm unfortunately about to change, or sever, a two-year relationship with a very slow-paying client. Most of the 15 invoices I've sent them arrive 6 to 8 weeks late, and usually only after repeated calls to the requesting client department, AP and finally Legal. I really think they would never pay some of these invoices if I didn't hound them. I don't have the time or energy or stress-handling to make repeated collection calls and...
0
17817
by: Nashat Wanly | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui06032003.asp Don't Lock Type Objects! Why Lock(typeof(ClassName)) or SyncLock GetType(ClassName) Is Bad Rico Mariani, performance architect for the Microsoft® .NET runtime and longtime Microsoft developer, mentioned to Dr. GUI in an e-mail conversation recently that a fairly common practice (and one that's, unfortunately, described in some of our...
19
3882
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set ReuseParameterValuesOnRefresh="True" in a viewer, but it still doesn't work. Did anyone run into this problem. What's the solution? Please help. Thank you
10
2099
by: Frank | last post by:
I've done this a few times. In a solution I have a project, Say P1, and need another project that will contain much code that is similar to that of P1. I hope no one gets hung up on why I don't somehow share the code. So, I copy the folder P1 is in, change the new folder name, and is VS2005 to change all occurrences of P1's name tp P2's name.
21
2068
by: jehugaleahsa | last post by:
Hello: I had an hour-long discussion with my boss today. Last night, right before I dozed off, I realized some of his code resulted in duplicate processing. I tried to explain it to him and he kept saying, "I'm afraid to say it's 'OK' to change it because everything I did was for a reason." Well, I know better. My boss' old code is written in some cryptic C file with Oracle precompiler macros barfed all over it. Once I figured out how...
1
11303
Nepomuk
by: Nepomuk | last post by:
You might have heard about Linux, but you don't know what it is? Or you know a few things about it, but they terrify you? Well, then this article is for you. Don't be afraid - Everyone can use Linux! Part 1: What is Linux and why should I use it? Linux is an Operating System (short: OS). OK, so what is an OS? Let me explain: Nearly everybody knows Windows. But what exactly does it actually do? Windows is an example for a OS and one of it's...
0
9470
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7475
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4033
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.