public class InetNas extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>
Modifier and Type | Field and Description |
---|---|
static int |
RADIUS_DISABLE_MODE_DEFAULT_POOL
2.
|
static int |
RADIUS_DISABLE_MODE_DEFAULT_STATIC
1.
|
static int |
RADIUS_DISABLE_MODE_DISABLE_POOL
0.
|
static int |
START_FROM_ACCESS_NO
Не создавать запись в базе при access-accept.
|
static int |
START_FROM_ACCESS_WAIT
При access-accept создавать запись в базе.
|
static int |
START_FROM_UPDATE_BY_CLOSE_TIMEOUT
Если пришел update пакет без старта - начинать соединение со времени действительного старта, если оно не раньше чем сейчас минус connection.close.timeout,
иначе - создавать с текущего момента. |
static int |
START_FROM_UPDATE_NO
Если пришел update пакет без старта - не начинать соединение.
|
static int |
START_FROM_UPDATE_NOW
Если пришел update пакет без старта - начинать соединение с текущего момента.
|
Constructor and Description |
---|
InetNas(Preferences setup,
InetRadiusProcessor processor,
ru.bitel.bgbilling.modules.inet.access.Access access,
int id,
ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor> oldNas,
java.net.InetAddress nasIPAddress,
java.lang.String nasIdentifier,
int vendorCode,
ParameterMap conf,
byte[] secret,
java.util.concurrent.ConcurrentMap<java.lang.Object,InetNasConnection> connections,
java.util.concurrent.ConcurrentMap<java.lang.Integer,InetNasConnection> portMap,
ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime deviceRuntime,
ru.bitel.bgbilling.kernel.network.radius.nas.NasConnectionInspector inspector) |
Modifier and Type | Method and Description |
---|---|
void |
addRadiusAttributes(ru.bitel.bgbilling.kernel.container.managed.ServerContext context,
RadiusListenerWorker<?> req,
ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime,
ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime servRuntime,
java.util.List<ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime> childrenServRuntimes,
RadiusSession<InetNas,InetRadiusSessionParams> radiusSession,
RadiusPacket response,
java.util.Set<java.lang.Integer> optionSet,
java.util.Set<java.lang.Integer> attrSets)
Deprecated.
Use
#addRadiusAttributes(ServerContext,RadiusListenerWorker>,InetServTypeRuntime,InetServRuntime,RadiusSession instead |
void |
addRadiusAttributes(ru.bitel.bgbilling.kernel.container.managed.ServerContext context,
RadiusListenerWorker<?> req,
ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime,
ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime servRuntime,
RadiusSession<InetNas,InetRadiusSessionParams> radiusSession,
RadiusPacket response,
java.util.Set<java.lang.Integer> optionSet,
java.util.Set<java.lang.Integer> attrSets) |
void |
addRejectRadiusAttributes(RadiusPacket response) |
boolean |
canActivateCard(int cardActivateServiceId)
Можно ли на NAS'е активировать карту с такой услугой активации.
|
void |
fanoutPacket(RadiusListenerWorker<?> req,
RadiusPacket packet) |
ru.bitel.bgbilling.modules.inet.runtime.ServSearchResult |
findServRuntime(ru.bitel.bgbilling.modules.inet.runtime.InetApplication application,
RadiusListenerWorker<?> req,
java.lang.String userName,
RadiusPacket request,
java.util.Date time)
Поиск подходящего сервиса в рантайме.
|
RadiusAccessRequestHandler |
getAccessRequestHandler() |
java.util.Set<java.lang.Integer> |
getActivateServiceIds()
Получение кодов услуг, которые можно активировать на данном NAS'е.
|
ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime |
getAgentDeviceRuntime(ru.bitel.bgbilling.modules.inet.runtime.InetApplication application,
RadiusListenerWorker<?> req,
RadiusPacket request)
Получение DHCP агента.
|
int |
getCardModuleId()
Код модуля карточек для активации карты.
|
int |
getCheckDuplicateSession(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
boolean |
getCheckDuplicateSessionType(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
protected InetNasConnection |
getConnection(java.lang.Object acctSessionId) |
long |
getConnectionCloseTimeout() |
int |
getConnectionStartFromAccessMode() |
int |
getConnectionStartFromUpdateMode() |
java.util.Set<java.lang.Integer> |
getDescendantIds() |
ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime |
getDeviceRuntime() |
int |
getDisableServId(RadiusPacket request)
Id сервиса для подмены при
AccessCodes.INVALID_ACCOUNT |
java.util.List<java.lang.Integer> |
getDisableServIds() |
DiscardedAccountingRequestHandler |
getDiscardedAccountingRequestHandler() |
RadiusAttributeSetFormatter |
getInvalidAccountErrorFormatter() |
int |
getIpResourceId(int agentDeviceId,
java.lang.String realm,
byte[] address,
java.util.Date start,
java.util.Set<java.lang.Integer> optionSet,
ru.bitel.bgbilling.modules.inet.radius.IpResourceEntry.AddressType addressType) |
java.lang.String |
getKeyPattern() |
long |
getParallelAccessRequestSkipTimeout()
Если на один DISCOVER идут параллельные Access-Request с разных NAS'ов (ipoe), то нужно ответить на один, а остальным Reject.
|
InetNasConnection |
getParentConnection(RadiusPacket request) |
ProtocolHandler |
getProtocolHandler() |
long |
getRadiusAccessServLockTimeout() |
long |
getRadiusConnectionServiceTimeout() |
int |
getRadiusDisableMode() |
int |
getServDeviceLink(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
int[][] |
getServSearchModes() |
int |
getSetIdentifier(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
int |
getSetMacAddress(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
java.lang.String[] |
getUsernameAndRealm(java.lang.String username) |
boolean |
isAcctSessIdAlwaysPresent() |
boolean |
isAddressFromRequest()
Устанавливать адрес из Framed-IP-Address из запроса, если он там есть.
|
boolean |
isAddressFromRequestCheck()
Проверка адреса из Access-Request - что подходит для статического диапазона сервиса.
|
boolean |
isCardCode(java.lang.String userName)
Проверяет, что логин числовой и что он в указанных в конфиге пределах.
|
boolean |
isConnectionAccessRequest()
Если true, то поддерживаем Access-Request для существующего соединения.
|
boolean |
isConnectionStartFromUpdateIgnoreFramedIpLack() |
boolean |
isDisableRealmAccessCode(int error)
Переводить ли на реалм disable (rejectToAccept) с этой ошибкой или просто послать reject.
|
boolean |
isDisableRealmIpAddress()
Deprecated.
|
boolean |
isIpAlwaysPresent() |
boolean |
isNasPortCorrect() |
boolean |
isPasswordVerification(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
Нужно ли проверять пароль при Access-Request
|
boolean |
isRealmAllowed(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime,
java.lang.String realm)
Возвращает можно ли подключиться с указанным реалмом.
|
boolean |
isUnauthorizedSession(int servId,
ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime servRuntime,
RadiusPacket request,
java.lang.String realm) |
boolean |
isUsernameIgnoreCase() |
java.util.concurrent.locks.Lock |
readLock() |
IpResourceReserve |
reserveIp(int agentDeviceId,
int servId,
java.lang.String username,
byte[] macAddress,
java.lang.String callingStationId,
java.lang.String identifier,
java.lang.String realm,
boolean[] resourceExist,
java.util.Set<java.lang.Integer> optionSet)
Deprecated.
|
IpResourceReserve |
reserveIp(int agentDeviceId,
int servId,
java.lang.String username,
byte[] macAddress,
java.lang.String callingStationId,
java.lang.String identifier,
java.lang.String realm,
boolean[] resourceExist,
java.util.Set<java.lang.Integer> optionSet,
ru.bitel.bgbilling.modules.inet.radius.IpResourceEntry.AddressType addressType) |
InetNasConnection |
setConnection(InetNasConnection nasCon,
java.sql.Connection con,
java.sql.Connection conSlave) |
InetNasConnection |
setConnection(InetNasConnection nasCon,
RadiusPacket nullz,
java.sql.Connection con,
java.sql.Connection conSlave)
Deprecated.
|
InetNasConnection |
startConnection(RadiusListenerWorker<?> req,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet,
java.util.Date time) |
void |
startWithParentAdd(java.util.Date time,
java.lang.String parentAcctSessionId,
RadiusPacket request)
Добавление пакета для отложенного старта сервисной сессии (чтобы она стартовала вместе с главной),
если главной сессии еще нет (т.е. старт пакеты пришли одновременно)
|
void |
startWithParentProcess(ConnectionSet connectionSet,
java.lang.String parentAcctSessionId) |
boolean |
stopConnection(java.sql.Connection con,
InetNasConnection nasCon,
long sessionTime,
boolean system,
long millis,
boolean force)
Останов соединения по радиус-пакету.
|
InetNasConnection |
stopConnection(RadiusListenerWorker<?> req,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet) |
InetNasConnection |
updateConnection(RadiusListenerWorker<?> req,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet) |
java.util.concurrent.locks.Lock |
writeLock() |
canActivateCard, connectionCount, connections, destroy, getAttributeSetMap, getConf, getDigestQop, getDigestRealm, getId, getNasIdentifier, getNasIPAddress, getRealmAttributeMap, getResponseSendMode, getScript, getSecret, getVendorCode, isCheckMessageAuthenticator, isMppeAddTypesAndPolicy, toString
public static final int RADIUS_DISABLE_MODE_DISABLE_POOL
public static final int RADIUS_DISABLE_MODE_DEFAULT_STATIC
public static final int RADIUS_DISABLE_MODE_DEFAULT_POOL
public static final int START_FROM_ACCESS_NO
public static final int START_FROM_ACCESS_WAIT
public static final int START_FROM_UPDATE_NO
public static final int START_FROM_UPDATE_NOW
public static final int START_FROM_UPDATE_BY_CLOSE_TIMEOUT
public InetNas(Preferences setup, InetRadiusProcessor processor, ru.bitel.bgbilling.modules.inet.access.Access access, int id, ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor> oldNas, java.net.InetAddress nasIPAddress, java.lang.String nasIdentifier, int vendorCode, ParameterMap conf, byte[] secret, java.util.concurrent.ConcurrentMap<java.lang.Object,InetNasConnection> connections, java.util.concurrent.ConcurrentMap<java.lang.Integer,InetNasConnection> portMap, ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime deviceRuntime, ru.bitel.bgbilling.kernel.network.radius.nas.NasConnectionInspector inspector)
public java.util.concurrent.locks.Lock readLock()
public java.util.concurrent.locks.Lock writeLock()
public RadiusAttributeSetFormatter getInvalidAccountErrorFormatter()
public ProtocolHandler getProtocolHandler()
public RadiusAccessRequestHandler getAccessRequestHandler()
public DiscardedAccountingRequestHandler getDiscardedAccountingRequestHandler()
public InetNasConnection getParentConnection(RadiusPacket request) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected InetNasConnection getConnection(java.lang.Object acctSessionId)
@Deprecated public InetNasConnection setConnection(InetNasConnection nasCon, RadiusPacket nullz, java.sql.Connection con, java.sql.Connection conSlave)
setConnection
in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>
public InetNasConnection setConnection(InetNasConnection nasCon, java.sql.Connection con, java.sql.Connection conSlave)
public InetNasConnection startConnection(RadiusListenerWorker<?> req, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, java.util.Date time)
startConnection
in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>
public InetNasConnection updateConnection(RadiusListenerWorker<?> req, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet)
updateConnection
in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>
public InetNasConnection stopConnection(RadiusListenerWorker<?> req, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet)
stopConnection
in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>
public boolean stopConnection(java.sql.Connection con, InetNasConnection nasCon, long sessionTime, boolean system, long millis, boolean force) throws ru.bitel.bgbilling.common.BGException
nasCon
- con
- system
- - если true - означает, что это обработка стоп пакета, а не события, пришедшего от другого accounting сервераru.bitel.bgbilling.common.BGException
public void addRadiusAttributes(ru.bitel.bgbilling.kernel.container.managed.ServerContext context, RadiusListenerWorker<?> req, ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime, ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime servRuntime, java.util.List<ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime> childrenServRuntimes, RadiusSession<InetNas,InetRadiusSessionParams> radiusSession, RadiusPacket response, java.util.Set<java.lang.Integer> optionSet, java.util.Set<java.lang.Integer> attrSets) throws ru.bitel.bgbilling.common.BGException
#addRadiusAttributes(ServerContext,RadiusListenerWorker>,InetServTypeRuntime,InetServRuntime,RadiusSession,RadiusPacket,Set,Set)
insteadru.bitel.bgbilling.common.BGException
public void addRadiusAttributes(ru.bitel.bgbilling.kernel.container.managed.ServerContext context, RadiusListenerWorker<?> req, ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime, ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime servRuntime, RadiusSession<InetNas,InetRadiusSessionParams> radiusSession, RadiusPacket response, java.util.Set<java.lang.Integer> optionSet, java.util.Set<java.lang.Integer> attrSets) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
@Deprecated public IpResourceReserve reserveIp(int agentDeviceId, int servId, java.lang.String username, byte[] macAddress, java.lang.String callingStationId, java.lang.String identifier, java.lang.String realm, boolean[] resourceExist, java.util.Set<java.lang.Integer> optionSet)
public IpResourceReserve reserveIp(int agentDeviceId, int servId, java.lang.String username, byte[] macAddress, java.lang.String callingStationId, java.lang.String identifier, java.lang.String realm, boolean[] resourceExist, java.util.Set<java.lang.Integer> optionSet, ru.bitel.bgbilling.modules.inet.radius.IpResourceEntry.AddressType addressType)
agentDeviceId
- servId
- username
- macAddress
- callingStationId
- identifier
- realm
- resourceExist
- optionSet
- addressType
- Default - ipPool, IPv6Prefix - prefixPool, IPv6DelegatedPrefix - delegatedPrefixPoolpublic boolean isUnauthorizedSession(int servId, ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime servRuntime, RadiusPacket request, java.lang.String realm)
public boolean isUsernameIgnoreCase()
public java.lang.String[] getUsernameAndRealm(java.lang.String username)
public int getIpResourceId(int agentDeviceId, java.lang.String realm, byte[] address, java.util.Date start, java.util.Set<java.lang.Integer> optionSet, ru.bitel.bgbilling.modules.inet.radius.IpResourceEntry.AddressType addressType) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public boolean isDisableRealmAccessCode(int error)
error
- public long getConnectionCloseTimeout()
public int getConnectionStartFromUpdateMode()
public void startWithParentAdd(java.util.Date time, java.lang.String parentAcctSessionId, RadiusPacket request)
time
- parentAcctSessionId
- request
- public void startWithParentProcess(ConnectionSet connectionSet, java.lang.String parentAcctSessionId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
@Deprecated public boolean isDisableRealmIpAddress()
public int getRadiusDisableMode()
public int getConnectionStartFromAccessMode()
public boolean isConnectionStartFromUpdateIgnoreFramedIpLack()
public boolean isRealmAllowed(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime, java.lang.String realm)
servTypeRuntime
- realm
- public boolean canActivateCard(int cardActivateServiceId)
cardActivateServiceId
- public java.util.Set<java.lang.Integer> getActivateServiceIds()
public int getCardModuleId()
public boolean isCardCode(java.lang.String userName)
userName
- public int[][] getServSearchModes()
public ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime getAgentDeviceRuntime(ru.bitel.bgbilling.modules.inet.runtime.InetApplication application, RadiusListenerWorker<?> req, RadiusPacket request)
application
- request
- public ru.bitel.bgbilling.modules.inet.runtime.ServSearchResult findServRuntime(ru.bitel.bgbilling.modules.inet.runtime.InetApplication application, RadiusListenerWorker<?> req, java.lang.String userName, RadiusPacket request, java.util.Date time)
application
- приложение Access или Accountingreq
- текущий обработчик radius-запросаuserName
- поле User-Name из запросаrequest
- сам radius-запросtime
- public void fanoutPacket(RadiusListenerWorker<?> req, RadiusPacket packet)
fanoutPacket
in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>
public boolean isPasswordVerification(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public int getDisableServId(RadiusPacket request)
AccessCodes.INVALID_ACCOUNT
public java.util.List<java.lang.Integer> getDisableServIds()
public int getSetMacAddress(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public int getSetIdentifier(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public int getServDeviceLink(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public int getCheckDuplicateSession(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public boolean getCheckDuplicateSessionType(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public java.util.Set<java.lang.Integer> getDescendantIds()
public long getRadiusAccessServLockTimeout()
public ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime getDeviceRuntime()
public java.lang.String getKeyPattern()
public boolean isAddressFromRequest()
public boolean isAddressFromRequestCheck()
public long getParallelAccessRequestSkipTimeout()
public boolean isAcctSessIdAlwaysPresent()
public boolean isIpAlwaysPresent()
public boolean isNasPortCorrect()
public long getRadiusConnectionServiceTimeout()
public boolean isConnectionAccessRequest()
public void addRejectRadiusAttributes(RadiusPacket response)