This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 101
Introduce session params #78
Open
pprindeville
wants to merge
5
commits into
kravietz:master
Choose a base branch
from
pprindeville:introduce-session-params
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Introduce session params #78
pprindeville
wants to merge
5
commits into
kravietz:master
from
pprindeville:introduce-session-params
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Still have more PR's to submit, but they are all predicated on the outstanding (unmerged) PR's. |
pprindeville
force-pushed
the
introduce-session-params
branch
3 times, most recently
from
November 11, 2016 17:59
9a4ee3f
to
3e8cff6
Compare
Only the last 2 commits apply: the rest are from branching from redux-packet-marshalling and will go away with a rebase once that gets merged to master. |
pprindeville
force-pushed
the
introduce-session-params
branch
2 times, most recently
from
December 3, 2016 01:54
3e44f9c
to
ecc89a2
Compare
pprindeville
force-pushed
the
introduce-session-params
branch
from
December 3, 2016 02:20
ecc89a2
to
cd5da0c
Compare
Rebased to PR #72 after it was rebased to master today. |
Merged
pprindeville
force-pushed
the
introduce-session-params
branch
2 times, most recently
from
December 8, 2016 01:22
925ddfe
to
b2d3c0d
Compare
pprindeville
force-pushed
the
introduce-session-params
branch
from
December 8, 2016 23:52
8dc155e
to
a498511
Compare
Derive the authentication type from tac_login string
It's precursory to separate marshalling functions from I/O if event-driven I/O is to be done, or if multiple Tacacs+ sessions can be active at the same time (you don't want to be polling on one socket and miss a timeout on another).
Unnecessary casts are a blight in that they mask possible programming errors. We shouldn't use them where they aren't required. Also, add a convenience function to convert a header pointer to a body pointer by adding the correct offset.
If you're connecting to multiple servers simultaneously, then per-server parameters can't be globals. Move them into a session container. Note: this obviously has API and ABI compatibility implications.
As this is obviously related to the session.
pprindeville
force-pushed
the
introduce-session-params
branch
from
December 21, 2016 03:10
a498511
to
c0a0c3d
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: This fix needs to be rebased after PR #72 is merged.
If you have a process which involves multiple simultaneous connections to different Tacacs+ servers (with different parameters, such as the secret, the session-id, the sequence #, etc) then having these values stored in globals is a severe hindrance.
This changeset presents a simplification of the API, containing all per-session data in a per-session object.
It also means that as new parameters get added in the future, this can be done with less source-level churn (though a version bump and recompile will still be required).
Lastly, there's the possibility of allocating extra data at the end of the session object for user-defined information to be stored; this could be as simple as a pointer to another object, or an entire nested object:
The callback data will be more useful in a subsequent patch which introduces event-driven querying using
libevent
but was introduced here since thetac_session
is being introduced here.