diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1Arbre.class b/DEV/DEV3.2/TP08_Arbres_suite/Q1Arbre.class deleted file mode 100644 index 0b16975..0000000 Binary files a/DEV/DEV3.2/TP08_Arbres_suite/Q1Arbre.class and /dev/null differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1Arbre.java b/DEV/DEV3.2/TP08_Arbres_suite/Q1Arbre.java deleted file mode 100644 index b96e05a..0000000 --- a/DEV/DEV3.2/TP08_Arbres_suite/Q1Arbre.java +++ /dev/null @@ -1,79 +0,0 @@ -import java.util.*; - -public class Q1Arbre{ - private Q1Noeud racine; - - public Q1Arbre(){ - this.racine = null; - } - - public Q1Arbre(int clef){ - this.racine = new Q1Noeud(clef); - } - - public Q1Arbre(Q1Noeud racine){ - this.racine = racine; - } - - public void add(Q1Noeud newNoeud){ - if (this.racine == null){ - this.racine = newNoeud; - } - else{ - this.racine.add(newNoeud); - } - } - - public void add(int clef){ - if (this.racine == null){ - this.racine = new Q1Noeud(clef); - } - else{ - this.racine.add(clef); - } - } - - private Q1Noeud plusPetit(){ - if (this.racine != null){ - Q1Noeud minimum = this.racine; - while (minimum.getPetit() != null){ - minimum = minimum.getPetit(); - } - return minimum; - } - return this.racine; - } - - private Q1Noeud plusGrand(){ - if (this.racine != null){ - Q1Noeud maximum = this.racine; - while (maximum.getPetit() != null){ - maximum = maximum.getPetit(); - } - return maximum; - } - return this.racine; - } - - private Q1Noeud suivant(int clef){ - if (this.racine != null){ - Q1Noeud maximum = this.racine; - while (maximum.getPetit() != null){ - maximum = maximum.getPetit(); - } - return maximum; - } - return this.racine; - } - - public void affichage(){ - if (this.racine != null){ - Q1Noeud plusPetit = this.racine; - while (plusPetit.getPetit() != null){ - plusPetit = plusPetit.getPetit(); - } - System.out.print(plusPetit); - while () - } - } -} \ No newline at end of file diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1Main.class b/DEV/DEV3.2/TP08_Arbres_suite/Q1Main.class deleted file mode 100644 index 53a6757..0000000 Binary files a/DEV/DEV3.2/TP08_Arbres_suite/Q1Main.class and /dev/null differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1Noeud.class b/DEV/DEV3.2/TP08_Arbres_suite/Q1Noeud.class deleted file mode 100644 index dc52e86..0000000 Binary files a/DEV/DEV3.2/TP08_Arbres_suite/Q1Noeud.class and /dev/null differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Arbre.class b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Arbre.class new file mode 100644 index 0000000..81c0fa8 Binary files /dev/null and b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Arbre.class differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Arbre.java b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Arbre.java new file mode 100644 index 0000000..6178c00 --- /dev/null +++ b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Arbre.java @@ -0,0 +1,37 @@ +public class Q1Arbre{ + private Q1Noeud racine; + + public Q1Arbre(){ + this.racine = null; + } + + public Q1Arbre(int clef){ + this.racine = new Q1Noeud(clef); + } + + public void add(int clef){ + if (this.racine == null){ + this.racine = new Q1Noeud(clef); + } + else{ + this.racine.add(clef); + } + } + + private void parcoursProfondeur(Q1Noeud noeud){ + if (noeud != null){ + if (noeud.getPetit() != null){ + parcoursProfondeur(noeud.getPetit()); + } + System.out.print(noeud + " "); + if (noeud.getGrand() != null){ + parcoursProfondeur(noeud.getGrand()); + } + } + } + + public void affichage(){ + this.parcoursProfondeur(this.racine); + System.out.println(); + } +} \ No newline at end of file diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Main.class b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Main.class new file mode 100644 index 0000000..592fec8 Binary files /dev/null and b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Main.class differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1Main.java b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Main.java similarity index 91% rename from DEV/DEV3.2/TP08_Arbres_suite/Q1Main.java rename to DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Main.java index 434b5a9..fdbc367 100644 --- a/DEV/DEV3.2/TP08_Arbres_suite/Q1Main.java +++ b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Main.java @@ -1,6 +1,3 @@ -import java.util.*; -import java.io.*; - public class Q1Main{ public static void main(String[] args){ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Noeud.class b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Noeud.class new file mode 100644 index 0000000..035389b Binary files /dev/null and b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Noeud.class differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q1Noeud.java b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Noeud.java similarity index 63% rename from DEV/DEV3.2/TP08_Arbres_suite/Q1Noeud.java rename to DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Noeud.java index cf4663a..06182b7 100644 --- a/DEV/DEV3.2/TP08_Arbres_suite/Q1Noeud.java +++ b/DEV/DEV3.2/TP08_Arbres_suite/Q1_Tri/Q1Noeud.java @@ -1,5 +1,3 @@ -import java.util.*; - public class Q1Noeud{ private int clef; private Q1Noeud petit; @@ -61,6 +59,42 @@ public class Q1Noeud{ } } + public Q1Noeud suivant(int clef){ + if (clef != this.clef){ + Q1Noeud next = null; + if (clef < this.clef){ + if (this.petit != null){ + next = this.petit.suivant(clef); + } + else{ + System.out.print(" 1)"+this); + return this; + } + } + if (clef > this.clef){ + if (this.grand != null){ + next = this.grand.suivant(clef); + } + else{ + System.out.print(this); + return this; + } + } + if (next == null){ + System.out.print(" 2)"+this); + return this; + } + else{ + System.out.print(" 3)"+next); + return next; + } + } + else{ + System.out.print(" 4)"+this.getGrand()); + return this.getGrand(); + } + } + public Q1Noeud getPetit(){ return this.petit; } diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Arbre.class b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Arbre.class new file mode 100644 index 0000000..fa1f1e1 Binary files /dev/null and b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Arbre.class differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Arbre.java b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Arbre.java new file mode 100644 index 0000000..07d4ddb --- /dev/null +++ b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Arbre.java @@ -0,0 +1,72 @@ +public class Q2Arbre{ + private Q2Noeud racine; + + public Q2Arbre(){ + this.racine = null; + } + + public Q2Arbre(int clef, String identifiant, String motDePasse){ + this.racine = new Q2Noeud(clef, identifiant, motDePasse); + } + + public void add(int clef, String identifiant, String motDePasse){ + if (this.racine == null){ + this.racine = new Q2Noeud(clef, identifiant, motDePasse); + } + else{ + this.racine.add(clef, identifiant, motDePasse); + } + } + + public Q2Noeud get(int clef){ + if (this.racine != null){ + return this.racine.get(clef); + } + return null; + } + + public boolean remove(int clef){ + if (this.racine != null){ + System.out.println("remove"); + Q2Noeud pereDeNoeudASuppr = this.racine.getPere(clef); + Boolean fils = pereDeNoeudASuppr.filsIsSmaller(clef); + Q2Noeud noeudASuppr = pereDeNoeudASuppr.getFils(fils); + if (noeudASuppr != null){ + if (noeudASuppr.getPetit() == null){ + System.out.println("petit"); + pereDeNoeudASuppr.setFils(fils, noeudASuppr.getGrand()); + return true; + } + else if (noeudASuppr.getGrand() == null){ + pereDeNoeudASuppr.setFils(fils, noeudASuppr.getPetit()); + return true; + } + else{ + Q2Noeud noeudRemplacant = noeudASuppr.getSuivant(); + if (noeudRemplacant.getKey() != noeudASuppr.getKey()){ + return noeudASuppr.updateAttribut(noeudRemplacant); + } + } + } + } + System.out.println("null2"); + return false; + } + + private void parcoursProfondeur(Q2Noeud noeud){ + if (noeud != null){ + if (noeud.getPetit() != null){ + parcoursProfondeur(noeud.getPetit()); + } + System.out.print(noeud + " "); + if (noeud.getGrand() != null){ + parcoursProfondeur(noeud.getGrand()); + } + } + } + + public void affichage(){ + this.parcoursProfondeur(this.racine); + System.out.println(); + } +} \ No newline at end of file diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Main.class b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Main.class new file mode 100644 index 0000000..33a2bb7 Binary files /dev/null and b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Main.class differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Main.java b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Main.java new file mode 100644 index 0000000..a5597e2 --- /dev/null +++ b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Main.java @@ -0,0 +1,57 @@ +import java.util.*; + +public class Q2Main{ + + public static void main(String[] args){ + HashMap dicoId = new HashMap<>(); + Q2Arbre arbre = new Q2Arbre(); + Scanner scanneur = new Scanner(System.in); + boolean programmeEnCours = true; + int numUser = 0; + while(programmeEnCours){ + String[] mots = scanneur.nextLine().split(" "); + if (mots[0].equals("add") && mots.length == 3){ + dicoId.put(mots[1], numUser); + arbre.add(numUser, mots[1], mots[2]); + numUser ++; + System.out.println("Utilisateur \""+mots[0]+"\" ajoute"); + } + else if (mots[0].equals("auth") && mots.length == 3){ + try{ + int clefArbre = dicoId.get(mots[1]); + if (arbre.get(clefArbre).getMotDePasse().equals(mots[2])){ + System.out.println("Utilisateur \""+mots[1]+"\" reconnu"); + } + else{ + throw(new NullPointerException("Utilisateur \""+mots[1]+"\" non reconnu")); + } + } + catch(NullPointerException e){ + System.out.println("Utilisateur \""+mots[1]+"\" non reconnu"); + } + } + else if (mots[0].equals("del") && mots.length == 2){ + try{ + int clefArbre = dicoId.get(mots[1]); + if (arbre.remove(clefArbre)){ + System.out.println("Utilisateur \""+mots[0]+"\" retire"); + } + else{ + throw(new NullPointerException("Utilisateur \""+mots[1]+"\" non retire")); + } + } + catch(NullPointerException e){ + System.out.println("Utilisateur \""+mots[1]+"\" non retire"); + } + } + else if (mots[0].equals("quit") && mots.length == 1){ + programmeEnCours = false; + } + else{ + System.out.println("operation incorrect ! Voici les operations possibles :\n- add \n- auth \n- del \n- quit"); + } + } + scanneur.close(); + arbre.affichage(); + } +} \ No newline at end of file diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Noeud.class b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Noeud.class new file mode 100644 index 0000000..60ed2c9 Binary files /dev/null and b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Noeud.class differ diff --git a/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Noeud.java b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Noeud.java new file mode 100644 index 0000000..f9e3ed4 --- /dev/null +++ b/DEV/DEV3.2/TP08_Arbres_suite/Q2_Authentification/Q2Noeud.java @@ -0,0 +1,169 @@ +public class Q2Noeud{ + private int clef; + private Q2Noeud petit; + private Q2Noeud grand; + private String identifiant; + private String motDePasse; + + public Q2Noeud(int clef, String identifiant, String motDePasse){ + this.clef = clef; + this.identifiant = identifiant; + this.motDePasse = motDePasse; + this.petit = null; + this.grand = null; + } + + public int getKey(){ + return this.clef; + } + + public String getIdentifiant(){ + return this.identifiant; + } + + public String getMotDePasse(){ + return this.motDePasse; + } + + public void add(int fils, String identifiant, String motDePasse){ + if (fils < this.clef){ + if (this.petit == null){ + this.petit = new Q2Noeud(fils, identifiant, motDePasse); + } + else{ + this.petit.add(fils, identifiant, motDePasse); + } + } + if (fils > this.clef){ + if (this.grand == null){ + this.grand = new Q2Noeud(fils, identifiant, motDePasse); + } + else{ + this.grand.add(fils, identifiant, motDePasse); + } + } + if (fils == this.clef){ + this.motDePasse = motDePasse; + this.identifiant = identifiant; + } + } + + public Q2Noeud get(int clef){ + if (clef < this.clef){ + if (this.getPetit() != null){ + return this.getPetit().get(clef); + } + return null; + } + if (clef > this.clef){ + if (this.getGrand() != null){ + return this.getGrand().get(clef); + } + return null; + } + if (clef == this.clef){ + return this; + } + return null; + } + + public Q2Noeud getPere(int clef){ + if (clef < this.clef){ + if (this.getPetit() != null){ + if (this.getPetit().getKey() == clef){ + return this; + } + return this.getPetit().getPere(clef); + } + } + if (clef > this.clef){ + if (this.getGrand() != null){ + if (this.getGrand().getKey() == clef){ + return this; + } + return this.getGrand().getPere(clef); + } + } + return null; + } + + public Q2Noeud getPetit(){ + return this.petit; + } + + public Q2Noeud getGrand(){ + return this.grand; + } + + public Q2Noeud getFils(Boolean isSmaller){ + if (isSmaller == true){ + return this.petit; + } + if (isSmaller == false){ + return this.grand; + } + return null; + } + + public Q2Noeud getSuivant(){ + if (this.getGrand() != null){ + return this.getGrand().getAvant(); + } + return this; + } + + public Q2Noeud getAvant(){ + if (this.getPetit() != null){ + return this.getPetit().getAvant(); + } + return this; + } + + public boolean setFils(boolean isSmaller, Q2Noeud fils){ + if (isSmaller == true){ + this.petit = fils; + return true; + } + if (isSmaller == false){ + this.grand = fils; + return true; + } + return false; + } + + public Boolean filsIsSmaller(int clef){ + if (this.petit.getKey() == clef){ + return true; + } + if (this.grand.getKey() == clef){ + return false; + } + return null; + } + + public int getNbFils(){ + int nbFils = 0; + if (this.petit != null){ + nbFils ++; + } + if (this.grand != null){ + nbFils ++; + } + return nbFils; + } + + public boolean updateAttribut(Q2Noeud nouveau){ + if (nouveau.getKey() > this.petit.getKey() && nouveau.getKey() < this.grand.getKey()){ + this.clef = nouveau.getKey(); + this.identifiant = nouveau.identifiant; + this.motDePasse = nouveau.motDePasse; + return true; + } + return false; + } + + @Override + public String toString(){ + return this.clef + " " + this.identifiant + " " + this.motDePasse; + } +} \ No newline at end of file diff --git a/DEV/DEV_Madelaine/Wamster_stub.tar.gz b/DEV/DEV_Madelaine/Wamster_stub.tar.gz new file mode 100644 index 0000000..bca3986 Binary files /dev/null and b/DEV/DEV_Madelaine/Wamster_stub.tar.gz differ diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Denomination.java b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Denomination.java new file mode 100644 index 0000000..6a81b5b --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Denomination.java @@ -0,0 +1,11 @@ +enum Denomination { + UN, + DEUX, + CINQ, + DIX, + VINGT, + CINQUANTE, + CENT, + DEUX_CENT, + CINQ_CENT +} \ No newline at end of file diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Individu.java b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Individu.java new file mode 100644 index 0000000..9040288 --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Individu.java @@ -0,0 +1,34 @@ +public class Individu{ + private String nom; + private Liasse fortune; + + public Individu(String nom){ + this.nom = nom; + this.fortune = new Liasse(); + } + + public void add(Denomination billet){ + this.fortune.addBillet(billet); + } + + public void payer(int valeur, Individu vendeur){ + // pas le temps + } + + public String printFortune(){ + String resultat = ""; + for (Denomination valeur : Denomination.values()){ + resultat += ("billet de "+this.fortune.getValeurBilletMonoliasse(valeur)+" : "+this.fortune.getNbBilletMonoliasse(valeur)+"\n"); + } + resultat += ("Total : "+this.fortune.getFortune()); + return resultat; + } + + public int getFortune(){ + return this.fortune.getFortune(); + } + + public String getNom(){ + return this.nom; + } +} \ No newline at end of file diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Liasse.java b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Liasse.java new file mode 100644 index 0000000..1d42e3e --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Liasse.java @@ -0,0 +1,51 @@ +public class Liasse{ + private Monoliasse[] listeMonoliasse; + + +// il faut convertir les enum en int pour un code fonctionnel + + public Liasse(){ + // double boucle a corriger + int i=0; + for (Denomination valeur : Denomination.values()){ + i++; + } + this.listeMonoliasse = new Monoliasse[i]; + i=0; + for (Denomination valeur : Denomination.values()){ + this.listeMonoliasse[i] = new Monoliasse(valeur, 0); + } + } + + public void addBillet(Denomination valeur){ + this.listeMonoliasse[valeur].addBillet(); + } + + public int getValeurBilletMonoliasse(Denomination valeur){ + return this.listeMonoliasse[valeur].getValeurBillet(); + } + + public int getNbBilletMonoliasse(Denomination valeur){ + return this.listeMonoliasse[valeur].getCombien(); + } + + public int getNbBillet(){ + int nbBillet=0; + for (Monoliasse monoliasse : this.listeMonoliasse){ + nbBillet += monoliasse.getCombien(); + } + return nbBillet; + } + + public int getFortune(){ + int fortune=0; + for (Monoliasse monoliasse : this.listeMonoliasse){ + fortune += monoliasse.getValeurMonoliasse(); + } + return fortune; + } + + public int getFortuneMonoliasse(Denomination valeur){ + return this.listeMonoliasse[valeur].getValeurMonoliasse(); + } +} \ No newline at end of file diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Main.java b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Main.java new file mode 100644 index 0000000..ccb4723 --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Main.java @@ -0,0 +1,17 @@ +public class Main{ + public static void main(String[] args){ + Individu titi = new Individu("titi"); + titi.add(Denomination.CINQ); + titi.add(Denomination.CINQ); + titi.add(Denomination.CINQ); + titi.add(Denomination.DIX); + titi.add(Denomination.DIX); + System.out.println(titi.getNom()+" a : \n"+titi.printFortune()); + Individu toto = new Individu("toto"); + toto.add(Denomination.UN); + toto.add(Denomination.UN); + toto.add(Denomination.UN); + toto.add(Denomination.DIX); + System.out.println(toto.getNom()+" a : \n"+toto.printFortune()); + } +} diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Monoliasse.java b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Monoliasse.java new file mode 100644 index 0000000..9b43ac7 --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice 2/Monoliasse.java @@ -0,0 +1,66 @@ +public class Monoliasse{ + private Denomination valeur; + private int combien; + + public Monoliasse(){ + this.valeur = null; + this.combien = 0; + } + + public Monoliasse(Denomination valeur){ + this.valeur = valeur; + this.combien = 1; + } + + public Monoliasse(Denomination valeur, int combien){ + this.valeur = valeur; + this.combien = combien; + } + + public void addBillet(){ + this.combien ++; + } + + public void removeBillet(){ + this.combien --; + } + + public int getCombien(){ + return this.combien; + } + + public int getValeurMonoliasse(){ + return this.getValeurBillet()*this.combien; + } + + public int getValeurBillet(){ + if (valeur == Denomination.UN){ + return 1; + } + if (valeur == Denomination.DEUX){ + return 2; + } + if (valeur == Denomination.CINQ){ + return 5; + } + if (valeur == Denomination.DIX){ + return 10; + } + if (valeur == Denomination.VINGT){ + return 20; + } + if (valeur == Denomination.CINQUANTE){ + return 50; + } + if (valeur == Denomination.CENT){ + return 100; + } + if (valeur == Denomination.DEUX_CENT){ + return 200; + } + if (valeur == Denomination.CINQ_CENT){ + return 500; + } + return 0; + } +} \ No newline at end of file diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice1/Billet.java b/DEV/DEV_Madelaine/Wamster_stub/exercice1/Billet.java new file mode 100644 index 0000000..55af6f8 --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice1/Billet.java @@ -0,0 +1,38 @@ +public class Billet{ + private Denomination valeur; + + public Billet(Denomination valeur){ + this.valeur = valeur; + } + + public int getValeur(){ + if (valeur == Denomination.UN){ + return 1; + } + if (valeur == Denomination.DEUX){ + return 2; + } + if (valeur == Denomination.CINQ){ + return 5; + } + if (valeur == Denomination.DIX){ + return 10; + } + if (valeur == Denomination.VINGT){ + return 20; + } + if (valeur == Denomination.CINQUANTE){ + return 50; + } + if (valeur == Denomination.CENT){ + return 100; + } + if (valeur == Denomination.DEUX_CENT){ + return 200; + } + if (valeur == Denomination.CINQ_CENT){ + return 500; + } + return 0; + } +} \ No newline at end of file diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice1/Denomination.java b/DEV/DEV_Madelaine/Wamster_stub/exercice1/Denomination.java new file mode 100644 index 0000000..6a81b5b --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice1/Denomination.java @@ -0,0 +1,11 @@ +enum Denomination { + UN, + DEUX, + CINQ, + DIX, + VINGT, + CINQUANTE, + CENT, + DEUX_CENT, + CINQ_CENT +} \ No newline at end of file diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice1/Individu.java b/DEV/DEV_Madelaine/Wamster_stub/exercice1/Individu.java new file mode 100644 index 0000000..7b99337 --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice1/Individu.java @@ -0,0 +1,34 @@ +import java.util.*; + +public class Individu{ + private String nom; + private List fortune; + + public Individu(String nom){ + this.nom = nom; + this.fortune = new ArrayList<>(); + } + + public boolean add(Billet billet){ + return this.fortune.add(billet); + } + + public void payer(int valeur, Individu vendeur){ + // to do (il faut pouvoir trier la liste du plus grand au plus petit) + // on pourrait alors utiliser un dictionnaire plutot qu'une liste pour avoir chaque billet en clef et le nombre de fois ou il est present en valeur. + // ce dictionnaire serait devrait etre trier. + // cette methode doit etre recursive pour que chaque individus se rembourse plusieurs fois jusqu'a ce qu'il ne puisse plus + } + + public int getFortune(){ + int total = 0; + for (Billet billet : fortune){ + total += billet.getValeur(); + } + return total; + } + + public String getNom(){ + return this.nom; + } +} \ No newline at end of file diff --git a/DEV/DEV_Madelaine/Wamster_stub/exercice1/Main.java b/DEV/DEV_Madelaine/Wamster_stub/exercice1/Main.java new file mode 100644 index 0000000..378a9f6 --- /dev/null +++ b/DEV/DEV_Madelaine/Wamster_stub/exercice1/Main.java @@ -0,0 +1,17 @@ +public class Main{ + public static void main(String[] args){ + Individu titi = new Individu("titi"); + titi.add(new Billet(Denomination.CINQ)); + titi.add(new Billet(Denomination.CINQ)); + titi.add(new Billet(Denomination.CINQ)); + titi.add(new Billet(Denomination.DIX)); + titi.add(new Billet(Denomination.DIX)); + System.out.println(titi.getNom()+" a : "+titi.getFortune()); + Individu toto = new Individu("toto"); + toto.add(new Billet(Denomination.UN)); + toto.add(new Billet(Denomination.UN)); + toto.add(new Billet(Denomination.UN)); + toto.add(new Billet(Denomination.DIX)); + System.out.println(toto.getNom()+" a : "+toto.getFortune()); + } +} diff --git a/SCR/SCR2/IMUNES/TP00/tp00.SCR.3.2.imn b/SCR/SCR2/IMUNES/TP00/tp00.SCR.3.2.imn new file mode 100644 index 0000000..cf64989 --- /dev/null +++ b/SCR/SCR2/IMUNES/TP00/tp00.SCR.3.2.imn @@ -0,0 +1,664 @@ +node n2 { + type lanswitch + network-config { + hostname switch3 + ! + } + canvas c0 + iconcoords {96 528} + labelcoords {97 556} + interface-peer {e0 n10} + interface-peer {e1 n19} + interface-peer {e2 n0} +} + +node n3 { + type lanswitch + network-config { + hostname switch4 + ! + } + canvas c0 + iconcoords {120 72} + labelcoords {75 55} + interface-peer {e0 n10} + interface-peer {e1 n11} + interface-peer {e2 n20} +} + +node n4 { + type lanswitch + network-config { + hostname switch5 + ! + } + canvas c0 + iconcoords {360 288} + labelcoords {341 309} + interface-peer {e0 n9} + interface-peer {e1 n11} + interface-peer {e2 n21} + interface-peer {e3 n1} +} + +node n5 { + type lanswitch + network-config { + hostname switch6 + ! + } + canvas c0 + iconcoords {816 48} + labelcoords {765 27} + interface-peer {e0 n9} + interface-peer {e1 n22} +} + +node n6 { + type lanswitch + network-config { + hostname switch7 + ! + } + canvas c0 + iconcoords {816 264} + labelcoords {810 232} + interface-peer {e0 n9} + interface-peer {e1 n12} + interface-peer {e2 n23} + interface-peer {e3 n8} +} + +node n7 { + type lanswitch + network-config { + hostname switch8 + ! + } + canvas c0 + iconcoords {528 312} + labelcoords {513 289} + interface-peer {e0 n12} + interface-peer {e1 n13} + interface-peer {e2 n14} +} + +node n9 { + type host + network-config { + hostname P5 + ! + interface eth3 + mac address 42:00:aa:00:00:09 + ip address 10.80.0.254/17 + ! + interface eth2 + mac address 42:00:aa:00:00:04 + ip address 10.64.0.254/17 + ! + interface eth1 + mac address 42:00:aa:00:00:03 + ip address 10.48.0.254/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ip route 0.0.0.0/0 10.80.0.255 + ip route 10.16.0.0/17 10.48.0.255 + ! + } + canvas c0 + iconcoords {576 96} + labelcoords {543 52} + interface-peer {eth1 n4} + interface-peer {eth2 n5} + interface-peer {eth3 n6} + custom-configs { + custom-config-id default { + custom-command /bin/sh + config { + ip addr add 127.0.0.1/8 dev lo0 + + ip addr add 10.48.0.254/17 dev eth1 + ip addr add 10.64.0.254/17 dev eth2 + ip addr add 10.80.0.254/17 dev eth3 + ip -6 addr add ::1/128 dev lo0 + + + iptables -t nat -A POSTROUTING -o eth3 -s 10.48.0.0/17 -j SNAT --to-source 10.80.0.254 + + rpcbind + inetd + + } + } + } + custom-enabled true + custom-selected default +} + +node n10 { + type host + network-config { + hostname P3 + ! + interface eth1 + mac address 42:00:aa:00:00:06 + ip address 10.32.0.254/17 + ! + interface eth0 + mac address 42:00:aa:00:00:05 + ip address 10.16.0.254/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ip route 10.48.0.0/17 10.32.0.55 + ! + } + canvas c0 + iconcoords {240 288} + labelcoords {246 328} + interface-peer {eth0 n2} + interface-peer {eth1 n3} +} + +node n11 { + type host + network-config { + hostname P4 + ! + interface eth1 + mac address 42:00:aa:00:00:08 + ip address 10.48.0.255/17 + ! + interface eth0 + mac address 42:00:aa:00:00:07 + ip address 10.32.0.255/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ip route 10.16.0.0/17 10.32.0.254 + ! + } + canvas c0 + iconcoords {312 96} + labelcoords {319 52} + interface-peer {eth0 n3} + interface-peer {eth1 n4} + custom-configs { + custom-config-id default { + custom-command /bin/sh + config { + ip addr add 127.0.0.1/8 dev lo0 + ip addr add 10.32.0.255/17 dev eth0 + ip addr add 10.48.0.255/17 dev eth1 + ip -6 addr add ::1/128 dev lo0 + + + iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 10.32.0.255 + iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 10.48.0.255 + + rpcbind + inetd + + } + } + } + custom-enabled true + custom-selected default +} + +node n12 { + type host + network-config { + hostname P6 + ! + interface eth0 + mac address 42:00:aa:00:00:0a + ip address 10.80.0.255/17 + ! + interface eth1 + mac address 42:00:aa:00:00:0b + ip address 102.103.104.255/15 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ! + } + canvas c0 + iconcoords {792 456} + labelcoords {751 479} + interface-peer {eth0 n6} + interface-peer {eth1 n7} + custom-configs { + custom-config-id default { + custom-command /bin/sh + config { + ip addr add 127.0.0.1/8 dev lo0 + ip addr add 10.80.0.255/17 dev eth0 + ip addr add 102.103.104.255/15 dev eth1 + ip -6 addr add ::1/128 dev lo0 + + + iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 102.103.104.255 + + rpcbind + inetd + + } + } + } + custom-enabled true + custom-selected default +} + +node n13 { + type router + model quagga + network-config { + hostname router1 + ! + interface eth1 + mac address 42:00:aa:00:00:0e + ip address 202.203.204.254/11 + ! + interface eth0 + mac address 42:00:aa:00:00:0c + ip address 102.103.104.254/15 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + router rip + redistribute static + redistribute connected + redistribute ospf + network 0.0.0.0/0 + ! + router ripng + redistribute static + redistribute connected + redistribute ospf6 + network ::/0 + ! + } + canvas c0 + iconcoords {792 576} + labelcoords {792 601} + interface-peer {eth0 n7} + interface-peer {eth1 n15} +} + +node n14 { + type host + network-config { + hostname host2 + ! + interface eth0 + mac address 42:00:aa:00:00:0d + ip address 102.103.104.104/15 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {384 456} + labelcoords {369 415} + interface-peer {eth0 n7} +} + +node n15 { + type host + network-config { + hostname host3 + ! + interface eth0 + mac address 42:00:aa:00:00:0f + ip address 202.203.204.204/11 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ! + } + canvas c0 + iconcoords {408 552} + labelcoords {408 588} + interface-peer {eth0 n13} +} + +node n19 { + type pc + network-config { + hostname pc3 + ! + interface eth0 + mac address 42:00:aa:00:00:13 + ip address 10.16.0.3/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ip route 10.32.0.0/17 10.16.0.254 + ! + } + canvas c0 + iconcoords {264 432} + labelcoords {264 463} + interface-peer {eth0 n2} +} + +node n20 { + type pc + network-config { + hostname pc4 + ! + interface eth0 + mac address 42:00:aa:00:00:14 + ip address 10.32.0.4/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ip route 10.16.0.0/17 10.32.0.254 + ip route 10.48.0.0/17 10.32.0.255 + ! + } + canvas c0 + iconcoords {48 264} + labelcoords {48 295} + interface-peer {eth0 n3} +} + +node n21 { + type pc + network-config { + hostname pc5 + ! + interface eth0 + mac address 42:00:aa:00:00:15 + ip address 10.48.0.5/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ip route 0.0.0.0/0 10.48.0.254 + ip route 0.16.0.0/17 10.48.0.255 + ! + } + canvas c0 + iconcoords {528 216} + labelcoords {528 247} + interface-peer {eth0 n4} +} + +node n22 { + type pc + network-config { + hostname pc6 + ! + interface eth0 + mac address 42:00:aa:00:00:16 + ip address 10.64.0.6/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ip route 0.0.0.0/0 10.64.0.254 + ! + } + canvas c0 + iconcoords {768 144} + labelcoords {768 175} + interface-peer {eth0 n5} +} + +node n23 { + type pc + network-config { + hostname pc7 + ! + interface eth0 + mac address 42:00:aa:00:00:17 + ip address 10.80.0.7/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ip route 0.0.0.0/0 10.80.0.255 + ip route 10.64.0.0/17 10.80.0.254 + ! + } + canvas c0 + iconcoords {624 216} + labelcoords {624 247} + interface-peer {eth0 n6} +} + +node n0 { + type host + network-config { + hostname host1 + ! + interface eth0 + mac address 42:00:aa:00:00:00 + ip address 10.16.0.200/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {48 360} + labelcoords {31 327} + interface-peer {eth0 n2} +} + +node n1 { + type pc + network-config { + hostname pc6-5 + ! + interface eth0 + mac address 42:00:aa:00:00:01 + ip address 10.48.0.6/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ip route 0.0.0.0/0 10.48.0.254 + ip route 0.16.0.0/17 10.48.0.255 + ! + } + canvas c0 + iconcoords {456 72} + labelcoords {429 41} + interface-peer {eth0 n4} +} + +node n8 { + type pc + network-config { + hostname pc8 + ! + interface eth0 + mac address 42:00:aa:00:00:02 + ip address 10.80.0.8/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ip route 0.0.0.0/0 10.80.0.255 + ip route 10.64.0.0/17 10.80.0.254 + ! + } + canvas c0 + iconcoords {648 288} + labelcoords {648 319} + interface-peer {eth0 n6} +} + +link l3 { + nodes {n9 n4} + bandwidth 0 +} + +link l4 { + nodes {n5 n9} + bandwidth 0 +} + +link l5 { + nodes {n10 n2} + bandwidth 0 +} + +link l6 { + nodes {n3 n10} + bandwidth 0 +} + +link l7 { + nodes {n11 n3} + bandwidth 0 +} + +link l8 { + nodes {n4 n11} + bandwidth 0 +} + +link l9 { + nodes {n6 n9} + bandwidth 0 +} + +link l10 { + nodes {n6 n12} + bandwidth 0 +} + +link l11 { + nodes {n7 n12} + bandwidth 0 +} + +link l12 { + nodes {n13 n7} + bandwidth 0 +} + +link l13 { + nodes {n7 n14} + bandwidth 0 +} + +link l14 { + nodes {n15 n13} + bandwidth 0 +} + +link l18 { + nodes {n19 n2} + bandwidth 0 +} + +link l19 { + nodes {n20 n3} + bandwidth 0 +} + +link l20 { + nodes {n4 n21} + bandwidth 0 +} + +link l21 { + nodes {n5 n22} + bandwidth 0 +} + +link l22 { + nodes {n6 n23} + bandwidth 0 +} + +link l0 { + nodes {n2 n0} + bandwidth 0 +} + +link l1 { + nodes {n1 n4} + bandwidth 0 +} + +link l2 { + nodes {n6 n8} + bandwidth 0 +} + +canvas c0 { + name {Canvas0} +} + +option show { + interface_names yes + ip_addresses yes + ipv6_addresses yes + node_labels yes + link_labels yes + background_images no + annotations yes + hostsAutoAssign no + grid yes + iconSize normal + zoom 1.0 +} + diff --git a/SCR/SCR2/IMUNES/TP00/tp00.SCR.3.2.pdf b/SCR/SCR2/IMUNES/TP00/tp00.SCR.3.2.pdf new file mode 100644 index 0000000..9ce1ae2 Binary files /dev/null and b/SCR/SCR2/IMUNES/TP00/tp00.SCR.3.2.pdf differ diff --git a/SCR/SCR2/IMUNES/TP00/tp20-extension.SCR.2.2.imn b/SCR/SCR2/IMUNES/TP00/tp20-extension.SCR.2.2.imn new file mode 100644 index 0000000..677f83f --- /dev/null +++ b/SCR/SCR2/IMUNES/TP00/tp20-extension.SCR.2.2.imn @@ -0,0 +1,637 @@ +node n2 { + type lanswitch + network-config { + hostname switch3 + ! + } + canvas c0 + iconcoords {96 528} + labelcoords {97 556} + interface-peer {e0 n10} + interface-peer {e1 n19} + interface-peer {e2 n0} +} + +node n3 { + type lanswitch + network-config { + hostname switch4 + ! + } + canvas c0 + iconcoords {120 72} + labelcoords {75 55} + interface-peer {e0 n10} + interface-peer {e1 n11} + interface-peer {e2 n20} +} + +node n4 { + type lanswitch + network-config { + hostname switch5 + ! + } + canvas c0 + iconcoords {360 288} + labelcoords {341 309} + interface-peer {e0 n9} + interface-peer {e1 n11} + interface-peer {e2 n21} + interface-peer {e3 n1} +} + +node n5 { + type lanswitch + network-config { + hostname switch6 + ! + } + canvas c0 + iconcoords {816 48} + labelcoords {765 27} + interface-peer {e0 n9} + interface-peer {e1 n22} +} + +node n6 { + type lanswitch + network-config { + hostname switch7 + ! + } + canvas c0 + iconcoords {816 264} + labelcoords {810 232} + interface-peer {e0 n9} + interface-peer {e1 n12} + interface-peer {e2 n23} + interface-peer {e3 n8} +} + +node n7 { + type lanswitch + network-config { + hostname switch8 + ! + } + canvas c0 + iconcoords {528 312} + labelcoords {513 289} + interface-peer {e0 n12} + interface-peer {e1 n13} + interface-peer {e2 n14} +} + +node n9 { + type host + network-config { + hostname P5 + ! + interface eth3 + mac address 42:00:aa:00:00:09 + ip address 10.80.0.254/17 + ! + interface eth2 + mac address 42:00:aa:00:00:04 + ip address 10.64.0.254/17 + ! + interface eth1 + mac address 42:00:aa:00:00:03 + ip address 10.48.0.254/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {576 96} + labelcoords {543 52} + interface-peer {eth1 n4} + interface-peer {eth2 n5} + interface-peer {eth3 n6} + custom-configs { + custom-config-id default { + custom-command /bin/sh + config { + ip addr add 127.0.0.1/8 dev lo0 + + ip addr add 10.48.0.254/17 dev eth1 + ip addr add 10.64.0.254/17 dev eth2 + ip addr add 10.80.0.254/17 dev eth3 + ip -6 addr add ::1/128 dev lo0 + + + iptables -t nat -A POSTROUTING -o eth3 -s 10.48.0.0/17 -j SNAT --to-source 10.80.0.254 + + rpcbind + inetd + + } + } + } + custom-enabled true + custom-selected default +} + +node n10 { + type host + network-config { + hostname P3 + ! + interface eth1 + mac address 42:00:aa:00:00:06 + ip address 10.32.0.254/17 + ! + interface eth0 + mac address 42:00:aa:00:00:05 + ip address 10.16.0.254/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {240 288} + labelcoords {246 328} + interface-peer {eth0 n2} + interface-peer {eth1 n3} +} + +node n11 { + type host + network-config { + hostname P4 + ! + interface eth1 + mac address 42:00:aa:00:00:08 + ip address 10.48.0.255/17 + ! + interface eth0 + mac address 42:00:aa:00:00:07 + ip address 10.32.0.255/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {312 96} + labelcoords {319 52} + interface-peer {eth0 n3} + interface-peer {eth1 n4} + custom-configs { + custom-config-id default { + custom-command /bin/sh + config { + ip addr add 127.0.0.1/8 dev lo0 + ip addr add 10.32.0.255/17 dev eth0 + ip addr add 10.48.0.255/17 dev eth1 + ip -6 addr add ::1/128 dev lo0 + + + iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 10.32.0.255 + iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 10.48.0.255 + + rpcbind + inetd + + } + } + } + custom-enabled true + custom-selected default +} + +node n12 { + type host + network-config { + hostname P6 + ! + interface eth0 + mac address 42:00:aa:00:00:0a + ip address 10.80.0.255/16 + ! + interface eth1 + mac address 42:00:aa:00:00:0b + ip address 102.103.104.255/15 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ! + } + canvas c0 + iconcoords {792 456} + labelcoords {751 479} + interface-peer {eth0 n6} + interface-peer {eth1 n7} + custom-configs { + custom-config-id default { + custom-command /bin/sh + config { + ip addr add 127.0.0.1/8 dev lo0 + ip addr add 10.80.0.255/17 dev eth0 + ip addr add 102.103.104.255/15 dev eth1 + ip -6 addr add ::1/128 dev lo0 + + + iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 102.103.104.255 + + rpcbind + inetd + + } + } + } + custom-enabled true + custom-selected default +} + +node n13 { + type router + model quagga + network-config { + hostname router1 + ! + interface eth1 + mac address 42:00:aa:00:00:0e + ip address 202.203.204.254/11 + ! + interface eth0 + mac address 42:00:aa:00:00:0c + ip address 102.103.104.254/15 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + router rip + redistribute static + redistribute connected + redistribute ospf + network 0.0.0.0/0 + ! + router ripng + redistribute static + redistribute connected + redistribute ospf6 + network ::/0 + ! + } + canvas c0 + iconcoords {792 576} + labelcoords {792 601} + interface-peer {eth0 n7} + interface-peer {eth1 n15} +} + +node n14 { + type host + network-config { + hostname host2 + ! + interface eth0 + mac address 42:00:aa:00:00:0d + ip address 102.103.104.104/15 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {384 456} + labelcoords {369 415} + interface-peer {eth0 n7} +} + +node n15 { + type host + network-config { + hostname host3 + ! + interface eth0 + mac address 42:00:aa:00:00:0f + ip address 202.203.204.204/11 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + ! + } + canvas c0 + iconcoords {408 552} + labelcoords {408 588} + interface-peer {eth0 n13} +} + +node n19 { + type pc + network-config { + hostname pc3 + ! + interface eth0 + mac address 42:00:aa:00:00:13 + ip address 10.16.0.3/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {264 432} + labelcoords {264 463} + interface-peer {eth0 n2} +} + +node n20 { + type pc + network-config { + hostname pc4 + ! + interface eth0 + mac address 42:00:aa:00:00:14 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {48 264} + labelcoords {48 295} + interface-peer {eth0 n3} +} + +node n21 { + type pc + network-config { + hostname pc5 + ! + interface eth0 + mac address 42:00:aa:00:00:15 + ip address 10.48.0.5/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {528 216} + labelcoords {528 247} + interface-peer {eth0 n4} +} + +node n22 { + type pc + network-config { + hostname pc6 + ! + interface eth0 + mac address 42:00:aa:00:00:16 + ip address 10.64.0.6/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {768 144} + labelcoords {768 175} + interface-peer {eth0 n5} +} + +node n23 { + type pc + network-config { + hostname pc7 + ! + interface eth0 + mac address 42:00:aa:00:00:17 + ip address 10.80.0.7/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {624 216} + labelcoords {624 247} + interface-peer {eth0 n6} +} + +node n0 { + type host + network-config { + hostname host1 + ! + interface eth0 + mac address 42:00:aa:00:00:00 + ip address 10.16.0.200/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + ! + } + canvas c0 + iconcoords {48 360} + labelcoords {31 327} + interface-peer {eth0 n2} +} + +node n1 { + type pc + network-config { + hostname pc6-5 + ! + interface eth0 + mac address 42:00:aa:00:00:01 + ip address 10.48.0.6/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + } + canvas c0 + iconcoords {456 72} + labelcoords {429 41} + interface-peer {eth0 n4} +} + +node n8 { + type pc + network-config { + hostname pc8 + ! + interface eth0 + mac address 42:00:aa:00:00:02 + ip address 10.80.0.8/17 + ! + interface lo0 + type lo + ip address 127.0.0.1/8 + ipv6 address ::1/128 + ! + } + canvas c0 + iconcoords {648 288} + labelcoords {648 319} + interface-peer {eth0 n6} +} + +link l3 { + nodes {n9 n4} + bandwidth 0 +} + +link l4 { + nodes {n5 n9} + bandwidth 0 +} + +link l5 { + nodes {n10 n2} + bandwidth 0 +} + +link l6 { + nodes {n3 n10} + bandwidth 0 +} + +link l7 { + nodes {n11 n3} + bandwidth 0 +} + +link l8 { + nodes {n4 n11} + bandwidth 0 +} + +link l9 { + nodes {n6 n9} + bandwidth 0 +} + +link l10 { + nodes {n6 n12} + bandwidth 0 +} + +link l11 { + nodes {n7 n12} + bandwidth 0 +} + +link l12 { + nodes {n13 n7} + bandwidth 0 +} + +link l13 { + nodes {n7 n14} + bandwidth 0 +} + +link l14 { + nodes {n15 n13} + bandwidth 0 +} + +link l18 { + nodes {n19 n2} + bandwidth 0 +} + +link l19 { + nodes {n20 n3} + bandwidth 0 +} + +link l20 { + nodes {n4 n21} + bandwidth 0 +} + +link l21 { + nodes {n5 n22} + bandwidth 0 +} + +link l22 { + nodes {n6 n23} + bandwidth 0 +} + +link l0 { + nodes {n2 n0} + bandwidth 0 +} + +link l1 { + nodes {n1 n4} + bandwidth 0 +} + +link l2 { + nodes {n6 n8} + bandwidth 0 +} + +canvas c0 { + name {Canvas0} +} + +option show { + interface_names yes + ip_addresses yes + ipv6_addresses yes + node_labels yes + link_labels yes + background_images no + annotations yes + hostsAutoAssign no + grid yes + iconSize normal + zoom 1.0 +} +