aboutsummaryrefslogtreecommitdiff
path: root/sbin/hastd/proto_socketpair.c
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* For functions that return -1 on failure check exactly for -1 and not forPawel Jakub Dawidek2012-01-101-1/+1
| | | | | | | | | any negative number. MFC after: 3 days Notes: svn path=/head/; revision=229945
* The proto API is a general purpose API, so don't use 'hast' in structures orPawel Jakub Dawidek2011-03-221-8/+7
| | | | | | | | | function names. It can now be used outside of HAST. MFC after: 1 week Notes: svn path=/head/; revision=219873
* In hast.conf we define the other node's address in 'remote' variable.Pawel Jakub Dawidek2011-03-211-2/+4
| | | | | | | | | | | | | | | | | | | | | This way we know how to connect to secondary node when we are primary. The same variable is used by the secondary node - it only accepts connections from the address stored in 'remote' variable. In cluster configurations it is common that each node has its individual IP address and there is one addtional shared IP address which is assigned to primary node. It seems it is possible that if the shared IP address is from the same network as the individual IP address it might be choosen by the kernel as a source address for connection with the secondary node. Such connection will be rejected by secondary, as it doesn't come from primary node individual IP. Add 'source' variable that allows to specify source IP address we want to bind to before connecting to the secondary node. MFC after: 1 week Notes: svn path=/head/; revision=219818
* - Rename proto_descriptor_{send,recv}() functions toPawel Jakub Dawidek2011-02-021-39/+9
| | | | | | | | | | | | | | proto_connection_{send,recv} and change them to return proto_conn structure. We don't operate directly on descriptors, but on proto_conns. - Add wrap method to wrap descriptor with proto_conn. - Remove methods to send and receive descriptors and implement this functionality as additional argument to send and receive methods. MFC after: 1 week Notes: svn path=/head/; revision=218194
* Implement two new functions for sending descriptor and receving descriptorPawel Jakub Dawidek2011-01-311-0/+30
| | | | | | | | | | over UNIX domain sockets and socket pairs. This is in preparation for capsicum. MFC after: 1 week Notes: svn path=/head/; revision=218139
* - Use pjdlog for assertions and aborts as this will log assert/abort messagePawel Jakub Dawidek2011-01-311-79/+32
| | | | | | | | | | | | to syslog if we run in background. - Asserts in proto.c that method we want to call is implemented and remove dummy methods from protocols implementation that are only there to abort the program with nice message. MFC after: 1 week Notes: svn path=/head/; revision=218138
* When someone gives NULL as data, assume this is because he want to declarePawel Jakub Dawidek2010-08-301-0/+8
| | | | | | | | | | connection side only. MFC after: 2 weeks Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com Notes: svn path=/head/; revision=212036
* Add an argument to the proto_register() function which allows protocol toPawel Jakub Dawidek2010-08-051-1/+1
| | | | | | | | | | declare it is the default and be placed at the end of the queue so it is checked last. MFC after: 1 month Notes: svn path=/head/; revision=210869
* Changing proto_socketpair.c compilation and linking order revealedPawel Jakub Dawidek2010-02-211-1/+4
| | | | | | | | a problem - we should simply ignore proto_server() if address doesn't start with socketpair://, and not abort. Notes: svn path=/head/; revision=204177
* Please welcome HAST - Highly Avalable Storage.Pawel Jakub Dawidek2010-02-181-0/+272
HAST allows to transparently store data on two physically separated machines connected over the TCP/IP network. HAST works in Primary-Secondary (Master-Backup, Master-Slave) configuration, which means that only one of the cluster nodes can be active at any given time. Only Primary node is able to handle I/O requests to HAST-managed devices. Currently HAST is limited to two cluster nodes in total. HAST operates on block level - it provides disk-like devices in /dev/hast/ directory for use by file systems and/or applications. Working on block level makes it transparent for file systems and applications. There in no difference between using HAST-provided device and raw disk, partition, etc. All of them are just regular GEOM providers in FreeBSD. For more information please consult hastd(8), hastctl(8) and hast.conf(5) manual pages, as well as http://wiki.FreeBSD.org/HAST. Sponsored by: FreeBSD Foundation Sponsored by: OMCnet Internet Service GmbH Sponsored by: TransIP BV Notes: svn path=/head/; revision=204076