Hi,
I have a question on how to enter values specifically ip_address in the gw table?
I would like to give a go this LCR module. I'm facing a problem where by: - 1. I created the tables (gw, lcr, gw_grp) 2. Inserting values into the tables ready for use.
The gw:ip_addr field is int data type, not able to store the decimal IP format!!
How to manage that?
Thanks in advance.
On 9/5/05, Juha Heinanen jh@tutpro.com wrote:
did you search the archives?
-- juha
--
Yes,
I searched the archives, both "users and dev" lists. May be my search keyword "LCR" was not enough:(. I was able to get the table structure and all discussion went through from february up to now, unfortunately, I didn't come across on how to achive the int value table insertion or conversion. Regards,
Amos Nungu writes:
<div>I was able to get the table structure and all discussion went through from february up to now, unfortunately, I didn't come across on how to achive the int value table insertion or conversion.</div>
this topic has been discussed many times on the mailing lists. people have even posted php code on how to generate the value.
-- juha
Amos Nungu wrote:
On 9/5/05, *Juha Heinanen* <jh@tutpro.com mailto:jh@tutpro.com> wrote:
did you search the archives? -- juha
--
Yes,
I searched the archives, both "users and dev" lists. May be my search keyword "LCR" was not enough:(.
I was able to get the table structure and all discussion went through from february up to now, unfortunately, I didn't come across on how to achive the int value table insertion or conversion.
You can convert IP address a.b.c.d to unsigned integer using:
int = d * 224 + c * 216 + b * 28 + a
Regards,
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Andres wrote:
You can convert IP address a.b.c.d to unsigned integer using:
int = d * 224 + c * 216 + b * 28 + a
I do not think that this will work. Try a+b*256+c*65536+d*16777216
Or even better: Backport this patch: http://cvs.sourceforge.net/viewcvs.py/openser/sip-server/scripts/sc?r1=1.5&a...
regards klaus
Hello there
sorry for my ignorance but in x86 (low ending machine) isn't it unsigned int = a*256^3 + b*256^2 + c*256 + d (or a>>24 + b>>16 + c>>8 + d) ?
Cheers !3runo
Klaus Darilion wrote:
You can convert IP address a.b.c.d to unsigned integer using:
int = d * 224 + c * 216 + b * 28 + a
I do not think that this will work. Try a+b*256+c*65536+d*16777216
Bruno Lopes F. Cabral wrote:
Hello there
sorry for my ignorance but in x86 (low ending machine) isn't it unsigned int = a*256^3 + b*256^2 + c*256 + d (or a>>24 + b>>16 + c>>8 + d) ?
yes, but AFAIK not in lcr module.
klaus
Cheers !3runo
Klaus Darilion wrote:
You can convert IP address a.b.c.d to unsigned integer using:
int = d * 224 + c * 216 + b * 28 + a
I do not think that this will work. Try a+b*256+c*65536+d*16777216
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi Juha,
Do you know any reason why ser core is programmed this way? It is quite counter-intuitive.
Thanks, Richard
On 9/6/05, Juha Heinanen jh@tutpro.com wrote:
Klaus Darilion writes:
yes, but AFAIK not in lcr module.
lcr module uses same coding for ipv4 address as ser core in struct ip_addr.
-- juha
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Richard Z wrote:
Hi Juha,
Do you know any reason why ser core is programmed this way? It is quite counter-intuitive.
SER is not about being intuitive. Its about being very fast.
Thanks, Richard
On 9/6/05, *Juha Heinanen* <jh@tutpro.com mailto:jh@tutpro.com> wrote:
Klaus Darilion writes: > yes, but AFAIK not in lcr module. lcr module uses same coding for ipv4 address as ser core in struct ip_addr. -- juha _______________________________________________ Serusers mailing list serusers@lists.iptel.org <mailto:serusers@lists.iptel.org> http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
I still don't get it. Why is the reverse order faster than the ordinary order?
It doesn't matter too much, well, except a few hours wasted to figure out why it didn't work in the first place.
On 9/22/05, Andres andres@telesip.net wrote:
Richard Z wrote:
Hi Juha,
Do you know any reason why ser core is programmed this way? It is quite counter-intuitive.
SER is not about being intuitive. Its about being very fast.
Thanks, Richard
On 9/6/05, *Juha Heinanen* <jh@tutpro.com mailto:jh@tutpro.com> wrote:
Klaus Darilion writes:
yes, but AFAIK not in lcr module.
lcr module uses same coding for ipv4 address as ser core in struct ip_addr.
-- juha
Serusers mailing list serusers@lists.iptel.org mailto:serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Klaus Darilion wrote:
Andres wrote:
You can convert IP address a.b.c.d to unsigned integer using:
int = d * 224 + c * 216 + b * 28 + a
Sorry about that. Klaus is correct. I did a copy paste from somewhere else without even reading!
Andres.
I do not think that this will work. Try a+b*256+c*65536+d*16777216
Or even better: Backport this patch: http://cvs.sourceforge.net/viewcvs.py/openser/sip-server/scripts/sc?r1=1.5&a...
regards klaus
Andres wrote:
Klaus Darilion wrote:
Andres wrote:
You can convert IP address a.b.c.d to unsigned integer using:
int = d * 224 + c * 216 + b * 28 + a
Sorry about that. Klaus is correct. I did a copy paste from somewhere else without even reading!
It should have read int = d * 2^24 + c * 2^16 + b * 2^8 + a
Andres.
I do not think that this will work. Try a+b*256+c*65536+d*16777216
Or even better: Backport this patch: http://cvs.sourceforge.net/viewcvs.py/openser/sip-server/scripts/sc?r1=1.5&a...
regards klaus