[fpc-pascal] fcl-db + IPv6 + Firebird

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Oct 7 10:43:23 CEST 2016


Hi,

A couple of questions...

  1. Does fcl-db code support connecting to databases (any DB servers)
     listening to IPv6 connections?

  2. Does anybody know how to tell Firebird RDBMS to listen to IPv6
    connections? From the 'netstat -a' output I can see that
    my Firebird server is only listening to IPv4 tcp connections.



An fcl-db IPv4 connection string to Firebird is in the format
"<ip_address>:</path/to/database>" and this results to real connection
string looking as follows:

  '192.168.0.20:E:\Databases\Test.fdb'             (Windows)
or
  '192.168.0.20:/data/devel/databases/test.fdb'    (Unix)


My concern is that IPv6 address use the : (colon) symbol, but it seems
even with IPv4 connections under Windows, it doesn't mind the extra
colon in the connection string (the colon after the drive letter). So
what would fcl-db's connection string look like to a IPv6 database?

Apache Web Server changes the syntax for IPv6 connections to
   [<ipv6_address>]:<port>
where the [ and ] are literal characters. This makes we wonder if fcl-db
with Firebird, and possible other database server follow a similar
pattern (I don't know if it is a well known standard - what Apache does)
- wrapping IPv6 address with brackets. So a Firebird IPv6 connection
could possible look as follows:

  '[2a02:c7f:143d:8400:cceb:e8:5338:9797]:/path/to/database/test.fdb'
or
  '[2a02:c7f:143d:8400:cceb:e8:5338:9797]:E:\dbpath\test.fdb'


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp



More information about the fpc-pascal mailing list