001 package dk.i1.sctp;
002 /**Notification that an association has been created, lost or not created.
003 This notification is further subclasses into:
004 <pre>
005 {@link SCTPNotificationAssociationChangeCommUp}
006 {@link SCTPNotificationAssociationChangeCommLost}
007 {@link SCTPNotificationAssociationChangeRestart}
008 {@link SCTPNotificationAssociationChangeShutdownComplete}
009 {@link SCTPNotificationAssociationChangeCantStartAssociation}
010 </pre>
011 */
012 public abstract class SCTPNotificationAssociationChange extends SCTPNotification {
013 public final short sac_type;
014 public final short sac_flags;
015 //public int sac_length;
016 public enum State {
017 SCTP_COMM_UP,
018 SCTP_COMM_LOST,
019 SCTP_RESTART,
020 SCTP_SHUTDOWN_COMP,
021 SCTP_CANT_STR_ASSOC
022 };
023 public final State sac_state;
024 public final short sac_error;
025 /**Maximum number of outbound streams*/
026 public final short sac_outbound_streams;
027 /**Maximum number of inbound streams*/
028 public final short sac_inbound_streams;
029 public final AssociationId sac_assoc_id;
030 //public byte[] sac_info;
031 SCTPNotificationAssociationChange(
032 short flags,
033 short sac_type,
034 short sac_flags,
035 State sac_state,
036 short sac_error,
037 short sac_outbound_streams,
038 short sac_inbound_streams,
039 long sac_assoc_id
040 ) {
041 super(flags,Type.SCTP_ASSOC_CHANGE);
042 this.sac_type = sac_type;
043 this.sac_flags = sac_flags;
044 this.sac_state = sac_state;
045 this.sac_error = sac_error;
046 this.sac_outbound_streams = sac_outbound_streams;
047 this.sac_inbound_streams = sac_inbound_streams;
048 this.sac_assoc_id = new AssociationId(sac_assoc_id);
049 }
050 }